Elamur Research

Contrastive Language-Image Pre-training for the Italian Language

Paper · 2021 · Federico Bianchi, Giuseppe Attanasio, Raphael Pisoni et al.

Summary

An image search in Italian needs a way to connect the words in a query to what is visible in a photograph. A system trained to make that connection in English already has useful visual knowledge, but its training gives it a different language for describing what it sees. Bianchi and colleagues adapt Contrastive Language–Image Pre-training, or CLIP, to Italian by pairing an existing image encoder with an Italian text encoder. Their study asks whether a dedicated Italian system can retrieve images and classify them more accurately than the multilingual version of CLIP they use for comparison. It brings together two problems in vision and language: obtaining suitable descriptions and learning which descriptions go with which images.

The authors assemble 1.4 million image–text pairs from Wikipedia, an Italian news outlet, and existing caption collections. Some captions were written in Italian, while others came through translation. The distinction matters because a caption can be perfectly readable and still provide little evidence about what an image looks like. The authors filter captions that consist largely of proper names in the Wikipedia material and check a sample of the translated web captions for quality. They then train the image and text encoders to put matching photographs and captions near one another in a shared vector space. Training begins with the layers that create this shared representation, followed by fine-tuning of the whole system.

CLIP-Italian outperforms the multilingual comparison on both tasks the authors evaluate. In MSCOCO-IT retrieval, it uses an Italian caption to select an image from a validation collection of 2000 images. In zero-shot ImageNet classification, it chooses among Italian prompts made from translated class names, with no classifier fitted for those classes. Its ImageNet scores are lower than those reported for the original English CLIP experiment, which used a much larger training collection and a more elaborate prompting procedure. The Italian study therefore demonstrates a gain over a particular multilingual alternative under its own evaluation conditions.

The paper also shows the kinds of matches the system makes in a photo search. A query about dogs in snow can retrieve a scene with the requested animals and setting, while a query for a small mouse can return a hedgehog. These examples help explain both the appeal and the uncertainty of ranking images by resemblance to a description. The authors release the trained checkpoint, training code and logs, and a demonstration for trying additional queries.

Deep dive: Contrastive Language-Image Pre-training for the Italian Language

CLIP-Italian adapts image–text pre-training to Italian and tests how well captions retrieve images and translated labels classify them. · about 31 minutes to read

The problem and its context

A visual task with a language requirement

An image classifier generally needs some way to specify its possible answers. In CLIP, those answers can be expressed in ordinary language. A search system can turn the arrangement around and use a written description to specify the image it wants to find. Both uses depend on the same learned relationship. From an image, the system needs to produce a representation that can be compared with the representation of a piece of text. The comparison needs to favor a description that fits the image over descriptions that fit it less well.

The authors place CLIP within a broader move towards learning across input types. They mention work that combines text and vision alongside work involving text and speech. Each input type contains different evidence about a subject. A photograph can show objects, people, colors and surroundings directly. A caption can name some of those details and can add information, such as a person's identity, that a reader could rarely infer from the pixels alone. A training objective has to turn the relationship between the inputs into a usable signal. Its design helps determine which aspects of that relationship the system learns to represent.

In the original CLIP work, the signal comes from associating images with the texts that accompany them. The system repeatedly has to pick out the observed image–text match from a collection of alternatives. It can acquire associations involving many kinds of scenes and expressions because those associations come from the captions. A developer does not have to decide the entire visual vocabulary in advance. Later, a reader or a benchmark can supply an expression the system is supposed to match against an image, or supply a collection of expressions and ask which best fits the image.

This flexibility places a demand on the language side of the system. The original CLIP training collection contained 400 million images collected from the web, with English supplying the language supervision. Its results showed that learning to compare images and English text could support zero-shot tasks. Those results left open how to offer the same interface in Italian. The visual evidence for a familiar object can transfer across languages, but the Italian expression for the object still has to lead to a compatible numerical representation. Language determines how a user can address the visual knowledge that training has made available. English

The choice between multilingual coverage and specialization

The multilingual CLIP system discussed in the paper already offered one way to connect images with text in languages other than English. Its multilingual text capability came through knowledge distillation. In this setting, the training strategy uses an existing system to guide the construction of a text representation that can serve several languages. That gives the Italian study a meaningful baseline. It can compare a dedicated Italian approach with an existing system that was also intended to handle Italian inputs.

The authors motivate specialization by pointing to earlier work on language-specific BERT checkpoints. That earlier work concerns language representations. For the image–text setting, it supplies a reason to try an Italian text encoder and test it against a multilingual option. The experiment also requires bridging Italian text to visual features. A text encoder that handles Italian well has yet to show that its outputs can be compared with a photograph in a way that answers a visual query. The new training pairs supply the evidence for learning that relationship. Multilingual and cross-lingual NLP

The vision side presents a different opportunity. An existing image encoder has already learned a way to organize visual information. Many of the distinctions it needs to represent remain relevant when the descriptions change language. Starting from that encoder lets the Italian project build on previous visual training. Starting from Italian BERT similarly gives the text side a representation of Italian before the paired training begins. The challenge is to make their outputs work together, and then decide how much of each encoder should be allowed to change as that coordination improves.

The choice to reuse both encoders matters for the interpretation of the work. The project is an adaptation of an existing image–language approach. The authors do create and use a new combined Italian training collection, but the encoders entering that training already carry information from their earlier checkpoints. The scale of the Italian collection therefore describes the new alignment and adaptation stage. It gives no complete accounting of all the data from which the final system benefits.

Why obtaining Italian pairs was part of the research

The earlier CLIP experiment made its case with a very large web collection. The Italian project faced a smaller supply of readily usable pairs. Together with the choice of encoders, this constraint shaped the design. The authors needed enough text to associate Italian words with varied visual content, while also trying to keep descriptions informative enough to provide a meaningful training signal. A picture paired with an article heading, a person's name or a poorly translated phrase may give the training objective little evidence about which visible attributes explain the pairing.

The paper describes several ways in which useful image text was already available. Wikipedia linked images with several kinds of text, including captions with different degrees of relevance to the depicted content. Existing caption datasets gave access to descriptions written for images, some already translated into Italian. A news collection offered descriptions written directly in Italian and associated with photographs selected by editors. Web images in a further caption dataset could be recovered where their addresses still worked, and their captions could be translated. These routes gave access to different subject matter and different kinds of Italian.

Translation made part of the collection possible at a scale that would have been difficult to obtain through manual description. It also introduced a question the authors treated as part of the study. A caption can lose a distinction in translation, acquire a stylistic choice absent from the original, or become difficult to understand. The authors wanted to assess whether the captions translated for training generally conveyed their source meaning. Later, they would face a related but separate problem when translating the short ImageNet labels used to specify the classification task. The paper thus connects adaptation to the quality of the language used at both stages. Machine translation

The method, step by step

Turning images and captions into comparable vectors

The system starts with an image and a piece of text that the dataset associates with it. An image encoder takes the photograph as input. A text encoder takes the caption. Each produces a numerical representation, frequently called an embedding. An embedding is a vector whose coordinates are learned so that its relationship to other vectors says something useful about the input. Here, the desired relationship is that an image and the text describing it should have a high similarity when compared in a common space.

A representation from a vision encoder and one from a text encoder need some preparation before that comparison makes sense. The coordinates of their original outputs come from different training histories. The authors use projection layers to turn the outputs into vectors of the same width and to learn a useful arrangement of those vectors. Both sides are projected to 512 dimensions. Having the same number of coordinates makes a comparison possible. Training determines whether that comparison reflects a relationship between the visible scene and the caption.

The pairing information supplies targets for that training. A minibatch contains matched images and captions. The system compares each image with all the captions in the minibatch, including the one paired with it. It also compares each caption with all the images in the minibatch. The observed pairs serve as the answers to both matching problems. Other combinations in the batch provide alternatives against which the observed pairs must score well.

The same comparison table therefore supports learning from either direction. Read along an image's row, it shows which caption the image most resembles. Read down a caption's column, it shows which image the caption most resembles. A high score for the intended pair helps with both decisions. A high score for the wrong pair can obstruct the choice in either direction. The paper uses cross-entropy to penalize this competition, then combines the two directional losses.

How CLIP-Italian learns to match images and captions

The steps in order.

How CLIP-Italian learns to match images and captionsStep 1: Collect corresponding images and Italian captions1. Collect corresponding images and Italian captionsStep 2: Encode images and captions separately2. Encode images and captions separatelyStep 3: Project both outputs into a shared space3. Project both outputs into a shared spaceStep 4: Score every image and caption combination4. Score every image and caption combinationStep 5: Average matching losses in both directions5. Average matching losses in both directionsStep 6: Train projections with both encoders frozen6. Train projections with both encoders frozenStep 7: Fine-tune the full system7. Fine-tune the full system

What the contrastive loss measures

The objective can be written by assuming that images and captions in a minibatch are ordered so matching items have the same index. In this notation, a score that falls on the diagonal of the comparison table belongs to an observed pair. All the other scores express how strongly competing combinations resemble each other. The scoring step can be written without choosing a more specific vector similarity function than the paper describes in its account of the loss.

sᵢⱼ = a · sim(vᵢ, tⱼ)

Here sᵢⱼ is the scaled score for the image indexed by i and the caption indexed by j. The symbol vᵢ denotes that image's projected vector, and tⱼ denotes the caption's projected vector. The function sim assigns a similarity to the vectors, a is the logit scale, and · means multiplication. A logit is a score used before the conversion to probabilities. The authors report using a logit scale of 20 during training.

The image-to-text loss turns each image's scores into a distribution over the candidate captions. It then measures how much probability goes to the paired caption. Written directly in terms of the scores, the directional loss is as follows.

Lᵢₘₐ₉ₑ = −meanᵢ log[exp(sᵢᵢ) / ∑ⱼ exp(sᵢⱼ)]

Here Lᵢₘₐ₉ₑ denotes the loss with the image as the query and the captions as alternatives. The subscripts on sᵢᵢ identify the observed pairing. In sᵢⱼ, i remains the index of the query image and j ranges over all candidate captions in the minibatch. The symbol ∑ⱼ adds the terms for those captions, exp is the exponential function, / denotes division, and log is the natural logarithm. The leading minus sign makes the loss larger when the probability assigned to the observed pair is smaller. The operation meanᵢ averages over query images. The characters in the subscript of Lᵢₘₐ₉ₑ spell “image” as a label for the loss.

For the reverse direction, the same pairwise scores are read with the caption held fixed. The alternatives are now the images. A caption contributes a small loss when its corresponding image captures a large share of the probability in that column.

Lₜₑₓₜ = −meanⱼ log[exp(sⱼⱼ) / ∑ᵢ exp(sᵢⱼ)]

Here Lₜₑₓₜ is the loss with the text as the query. The caption index is j, and sⱼⱼ is the score of the image paired with that caption. In sᵢⱼ, i ranges over the candidate images, so ∑ᵢ adds their exponentiated scores. As before, exp is the exponential, / divides, and log is the natural logarithm. The minus sign changes the log probability into a loss, and meanⱼ averages the losses over captions. The subscript on Lₜₑₓₜ labels this as the text direction.

The training objective takes the arithmetic mean of the directional losses.

L = mean(Lᵢₘₐ₉ₑ, Lₜₑₓₜ)

Here L is the final batch loss. The arguments of mean are the image-to-text and text-to-image losses defined immediately above, and mean gives them equal weight.

The denominator in each directional loss explains why batch composition matters. A plausible alternative caption can compete strongly with the paired caption even when both describe similar scenes. Likewise, a caption about a common subject may fit several images in the batch to some degree. The observed pairing tells the loss which one should win. It supplies a consistent training target, while leaving open how visually or semantically appropriate the other combinations might be. A low loss means the system assigns strong relative scores to the recorded pairs under this setup.

The logit scale changes how sharply differences in similarity become differences in probability. When scores are multiplied by a positive scale, the ordering of the underlying similarities for fixed vectors stays the same. Their distribution after exponentiation can change substantially. During training this affects the loss and the signal used to adjust the system. The authors say the scaling made an empirical difference to performance. The stated value belongs to the training recipe, while the qualitative observation about its effect is discussed later.

Assembling the Italian training pairs

The training collection includes several kinds of image caption. WIT links Wikipedia images with text in multiple languages. The authors extract its Italian portion and choose the caption type called Reference Description. WIT can associate several possible captions with an image, and the type matters for this project because some available text speaks more directly to the image than other text does. The authors follow the WIT description of Reference Descriptions as particularly relevant and suitable, then apply an additional filter to that material.

MSCOCO-IT provides images with Italian versions of the original MSCOCO descriptions. These captions were translated with Microsoft Translator before the authors used them. The paper describes the 2017 MSCOCO training set as containing more than 100K images and notes that images can have several captions. Image counts and pair counts are consequently different measures. An image can contribute more than one pairing and show the training procedure different ways to describe the same visible scene.

Conceptual Captions provides web image addresses and associated descriptions. The source collection has more than 3 million image–caption pairs according to the paper's description. The authors attempt to recover images using the addresses, but some images are unavailable. The pairs they can assemble are constrained by which media can still be reached. The dataset account describes roughly 710K captions translated into Italian with DeepL. This supplies Italian descriptions for a large web-derived portion of the collection even though the underlying images were gathered for an earlier dataset.

Il Post supplies La Foto del Giorno, also called ILPOST in the paper. Its editors had been selecting photographs connected with events since early 2011, and the associated descriptions supplied material written in Italian. The paper puts the resulting collection at almost 30K image–caption pairs. The editorial context distinguishes the source from a collection produced for a caption benchmark. An editor may use a caption to explain who is involved or why an event matters as well as to identify what is visible.

The combination gives CLIP-Italian access to images described for different purposes. An encyclopedia caption may identify a particular person or place. A description created for an image collection can offer a wording of an ordinary visual scene. A news caption can place a photograph in a particular event. The pairwise loss treats the associated text as the target in each case. It makes no explicit distinction among those purposes, which is why choosing caption types and filtering the data are important parts of the method.

Assessing translations and filtering the captions

For the batch of translations discussed in the translation quality section, the authors use DeepL and describe the volume as 700K captions. They explain their choice in terms of the smaller supply of training images they could use compared with original CLIP. If Italian text was to act as the signal for aligning the available images, poor translations could degrade that signal. The existing MSCOCO-IT translations have a separate provenance and use Microsoft Translator.

Three of the authors, all native Italian speakers, compare a sample of 100 translated captions with their English originals. Their ratings run from 1 to 4. A 1 indicates that the intended meaning is lost or that the sentence is too hard to understand. A 2 indicates that the broad message survives despite a problem. A 3 describes a good translation that could still strike a native reader as awkward. A 4 marks a very good translation. This task asks raters to judge the Italian in light of the original wording. It supplies an explicit language-quality check before the visual matching results are considered. Linguistic annotation

The first cleaning rule focuses on WIT. The authors use part-of-speech tagging to assign grammatical categories to the caption tokens. One of those categories is PROPN, the label for a proper noun. They discard captions whose tokens are 80% or more proper nouns. The intuition is that a string consisting mainly of a personal name generally gives the shared representation less descriptive evidence about appearance or setting than a caption that also tells the reader what is happening. The rule removed around 10% of the WIT captions.

The filter stands in for a more expensive judgment about the relationship between an image and its text. With a short caption that gives only a person's name, the system could still learn an association from enough consistent images of that person. With a caption that names a person and an activity, the words for the activity can provide visual supervision that carries across more images. The threshold captures the contrast between these cases only approximately. Its practical role is to remove a class of captions the authors regarded as especially likely to offer sparse visual description.

The ILPOST cleaning rule asks a different question. The authors run langdetect on its captions and remove those classified as non-Italian. Less than 2% of the captions are lost in this step. The purpose is to keep the language on the caption side consistent with the adaptation goal. The paper's stated procedure checks language membership for ILPOST and grammatical composition for WIT. Each addresses a different possible mismatch between a source's original purpose and the project's training needs.

Fitting the shared space before updating the encoders

The image encoder starts from OpenAI's CLIP vision checkpoint, identified in the paper as clip-vit-base-patch32. This encoder is a Vision Transformer, or ViT. It represents the image for downstream comparison and already comes from image–text training. On the other side, the paper uses a cased Italian BERT checkpoint, bert-base-italian-xxl-cased. BERT produces a representation of the caption. The initial encoders thus arrive with learned parameters for their respective inputs, and the Italian pairing objective provides the shared training signal. Transformer and attention

Text sequences are limited to 96 tokens, and the reported batch size is 128. A token is a unit the text encoder processes as part of its input. The length limit bounds how much caption text goes into a training example. Batch size determines how many pairs contribute to a training step and which images and captions can compete in its matching objective. The paper's recipe thus specifies both how much information an individual caption can supply and the immediate set of alternatives against which the pair is learned. Tokenization

The authors augment the images, meaning they apply variations of the same image during training. They use random affine and perspective transformations, occasionally apply equalization, and vary brightness, contrast, saturation and hue. The image still goes with its original caption after the transformation. This imposes a practical constraint on the transformations. If an alteration changes a described property enough, it weakens the relationship that the training pair is meant to express. The authors specifically limit changes in hue to preserve an opportunity to learn how color words relate to what is visible.

Optimization uses AdaBelief, adaptive gradient clipping and a cosine annealing schedule. The optimizer uses the training gradients to update parameters. Clipping constrains unusually large updates suggested by the gradients. The schedule changes the learning rate over training. These are parts of the reported training procedure alongside the decisions about input length, batch size and image variation.

The first stage keeps the image and text encoders frozen. Their parameters stay fixed while the projections learn how to map their outputs into the comparison space. This makes the initial problem one of using the features already available on each side to score the observed pairs. The authors carry on until the loss converges, then unfreeze the encoders and fine-tune the entire architecture. In the second stage, an update can change the way the input is represented as well as the way that representation is projected into the shared space.

The authors report evaluating every 15 epochs and retaining the checkpoint with the best evaluation loss. An epoch is a pass through the training collection. Selecting by loss means the shared matching objective guides the choice of checkpoint, while retrieval and classification are the downstream tests of that choice. The paper releases the trained CLIP-Italian checkpoint, the code for its architecture and training, a CometML report with metrics and training logs, and the Hugging Face demonstration used for interactive searches.

Using the shared space after training

At inference time, a retrieval query requires a text vector and a collection of image vectors. Each comparison yields a score for one candidate image. The system can rank the images and present the highest-scoring ones. An image collection therefore supplies the alternatives against which the written query is interpreted. The retrieval procedure places no requirement on the text to be the name of a pre-defined visual category.

For classification, the input and alternatives change places. The system represents the image and compares it with text prompts written for the classes under consideration. The class of the highest-scoring prompt becomes the prediction. The new task can be set up through language because the training stage already established a way to compare images and text. That is what “zero-shot” means for the ImageNet experiment. The paper evaluates a choice among the benchmark's class prompts without a separately fitted classifier for those categories.

Experiments and results

The comparison and its two tasks

The main quantitative comparison uses multilingual CLIP, also called mCLIP in the paper. The baseline was constructed using multilingual knowledge distillation, while CLIP-Italian was trained on the assembled Italian image–text collection with its chosen starting checkpoints. Thus the comparison puts the entire Italian adaptation against an available multilingual alternative. Performance is measured after those choices have been made for each system.

Retrieval and classification use the shared space in complementary ways. In retrieval, a caption specifies what to find and a pool of actual images supplies the candidates. In classification, the image is given and the captions are prompts constructed from the benchmark's category names. Retrieval reports how well descriptions lead back to their associated images, while classification accuracy reports whether the predicted class agrees with the benchmark's answer. Each task places different demands on the text encoder and on the alignment. Evaluation and benchmarks

Finding an image from an Italian caption

For retrieval, the authors use the MSCOCO-IT validation collection and state that it was kept out of training. It contains 2000 images associated with captions. For each caption query, the system places the text in the shared space and selects the image whose vector has the greatest similarity to it. The recorded association supplies the target image. This defines the comparison even in a situation where an Italian caption could describe more than one image in the candidate set.

The setup makes the text carry more than a class name. A caption can name multiple things, say something about their setting, or use a combination of attributes that narrows the intended image. A retrieval success means that the actual paired image ranked well enough under the paper's selection procedure. A competing photo can be visually compatible with a caption and still fail the benchmark's pairing criterion. For a reader interpreting the result, this is a difference between identifying the recorded item and judging whether a search result is a reasonable fit.

The paper reports that CLIP-Italian outperforms mCLIP on this validation task. It identifies the task as MSCOCO image retrieval and describes the selection rule, while its written discussion gives the direction of the result without stating numerical scores or naming a more specific retrieval statistic. The count of 2000 is the size of the validation image collection. It supplies the scale of the search and cannot be used to infer the proportion of correctly retrieved images.

The choice of MSCOCO-IT also defines the type of generalization directly demonstrated. The validation images are held out according to the paper, and the training collection includes material from the same dataset family. The result concerns unseen validation items under that benchmark's captioning conditions. The separate Unsplash25K demonstration exposes the system to a different photo collection and freer query wording, with a different kind of evidence.

Using translated class names to classify ImageNet images

The classification experiment adapts the original CLIP ImageNet setup to Italian. The authors add an article to the source class name before translating it with DeepL. This gives the translator the label in the form of a noun phrase. Their example is a cat, rendered in Italian as un gatto. They then put the translated phrase into a photo description beginning with una foto di. For the cat class, the resulting prompt describes a photo of a cat.

This procedure makes a category available to the text encoder as an expression of what might appear in a photograph. The same pattern is applied across the classes. For a given test image, the system produces its image vector, compares it with the prompt vectors, and predicts the class whose prompt scores highest. The authors calculate classification accuracy on the ImageNet-1000 task. Accuracy here concerns agreement with the benchmark class, even when a different prompt might also name something visible in the picture.

The paper reports that CLIP-Italian exceeds mCLIP on this task as well. Its ImageNet scores fall below those reported for the original CLIP experiment. The classification discussion gives the ordering and the factors the authors thought could influence it, without stating the individual accuracy values in the written account. In particular, it calls attention to the translated class names and describes the original English evaluation as averaging across several prompt templates. The Italian experiment uses a simpler template procedure.

The comparison with original CLIP also spans different pretraining collections. That difference can be shown numerically from the paper's reported data sizes. It establishes the scale of the available paired supervision for the two projects, while the accuracy comparison itself remains directional.

Paired training examples for original CLIP and CLIP-Italian

The original CLIP web collection supplied more image–text pairs than the combined Italian training collection.

Paired training examples for original CLIP and CLIP-ItalianOriginal CLIP web collection: 400Original CLIP web collection400CLIP-Italian combined collection (this paper): 1.4CLIP-Italian combined collection (thispaper)1.4
The numbers
System or settingmillion image–text pairs
Original CLIP web collection400
CLIP-Italian combined collection (this paper)1.4

The chart compares corpus size. It measures the paired examples used to train the original system and those used in the Italian project, whose starting checkpoints already embody prior training. More pairs describe greater data volume in this figure. The amount of Italian data needed to reproduce original CLIP's reported accuracy is a separate question because the two experiments also differ in language, prompts and training procedure.

What the photo search demonstration shows

In the qualitative evaluation, the authors query the Unsplash25K photo collection through their demo. A request for dogs on snow brings back an image that fits the animals and the setting, including the count requested in the paper's example. The strength of this case is the combination of cues. An image of dogs on another surface or a snowy landscape with no dogs could satisfy part of the description. The successful example shows that the shared representation can favor a scene in which those cues occur together.

Another example asks for a couple at sunset. The retrieved photograph shows people together with evening light behind them. A mountain query keeps the idea of a couple and changes the surroundings. Those examples show how the query can vary an attribute of the scene without requiring a dedicated interface for specifying foreground subjects and background features. The Italian caption functions as the instruction for retrieval, and the ranking reflects the matches available in the photo collection.

The mouse example moves in the other direction. The paper's small-mouse query returns a small hedgehog. An image may have broadly compatible visual cues while depicting the wrong animal. The example establishes the mismatch but does not identify what drove the ranking. It could be useful for inspecting the kinds of distinctions the system misses, while a single returned image cannot determine whether the issue began with a particular word, the visual features, or the available candidates.

The quantitative and qualitative sections consequently answer different questions. The benchmark tests supply a common setup on which the Italian and multilingual systems can be compared. The demonstration lets the authors inspect the content of individual matches and illustrate successes and failures that are difficult to read from an aggregate score. The paper presents the photo queries as examples. It gives no population of queries or success rate for that demonstration.

What the ablations show

The paper reports no systematic component ablation, and its additional evidence comes from a translation review, data-filter counts, observations about training, and qualitative retrieval examples. These analyses vary in what they measure. The translation review gives recorded judgments about the captions. The filters have documented effects on how much source material is retained. The training observations describe choices that worked for the authors. The retrieval examples show behaviors worth interpreting at the level of individual cases.

The captions passed a direct language review

The native-speaker assessment gives the sampled Conceptual Captions translations an average quality score of 3.78 on the scale from 1 to 4. The paper reports inter-rater agreement of 0.858 under Gwet's AC1 with ordinal weighting. The scale categories have an order, and ordinal weighting lets the agreement statistic account for whether rating differences are close or far apart. The authors interpret the value as strong agreement. Together, the ratings and agreement speak to whether the sampled Italian captions preserve the intended meaning and read well to the raters.

This check matters because a strong score in retrieval would give only indirect information about translation quality. The rating exercise evaluates the captions themselves and can reveal awkwardness or lost meaning without asking the image–text system to make a prediction. Its evidence belongs to the reviewed sample. The paper reports no downstream comparison using alternative translations of those same captions or a training run with those pairs omitted. The review therefore gives a basis for trusting the translations on average without estimating how much they contributed to retrieval or classification.

The filters changed the amount of training text in different ways

The WIT proper-noun rule removes around 10% of that source's captions, while the language check removes less than 2% of the ILPOST captions. These figures describe what the rules did to their respective source collections. They also show why the rules should be interpreted in relation to each dataset. The WIT procedure targets usable visual description within the chosen captions. The ILPOST procedure targets the language of the description.

A before-and-after count can establish how much material a filter affected. To estimate improvement in the final scores, the experiment would need to train and evaluate under different cleaning settings while controlling other changes. The paper's account does not report that comparison. The available figures support a narrower conclusion. Both cleaning steps left the greater part of their respective sources available, and the authors judged the particular classes of discarded text to be ill suited to the adaptation.

The training choices come with observations about use

The authors say that starting with the projections helped when both encoders came from existing checkpoints. That stage has a clear mechanical role. It lets the training objective organize the outputs of the two pre-existing encoders before any updates change the features those encoders produce. Once the encoders are unfrozen, the objective can influence the features as well as the shared projection.

The paper also reports a strong favorable empirical effect from logit scaling. The score scale of 20 is a precise setting, but the paper gives no series of alternative settings and associated downstream scores. The explanation of the loss shows why scaling can affect optimization. The reported observation tells the reader that the authors found it consequential in their recipe. The contribution it makes to the baseline advantage remains unquantified. The same applies to the warm-up stage and the limits on image color changes.

Counting and composition appear as behaviors to investigate

The qualitative results offer a small probe of whether the shared representation responds to combinations, including an object and a background or several entities in one scene. The authors describe success with up to three distinct or repeated elements in their empirical exploration. They also describe a marked decline in the coherence of results when queries involve more than three elements. Their suggested explanation is that the training collection may have relatively few images that depict larger groups of subjects.

The examples do not establish the frequency of larger groups in training or the range of counts the system can resolve under controlled conditions. In the snowy-dogs example, number is accompanied by strong cues about the type of animal and the background. A test that kept those cues fixed while varying the requested number would address a more specific question. The study instead shows that some returned images meet a combination of conditions, and that the authors found the behavior less reliable as the number of entities increased.

Limitations

Limits the authors identify

The authors make clear that the Italian project has less paired training material and more limited computation than original CLIP. Resource constraints shaped the choice to reuse pretrained encoders, to draw on existing caption sources and to translate a share of the captions. The paper reports access to Google Cloud TPUs during two weeks of sponsorship. Its ethical discussion estimates a cost of 2,688$ for each TPU used, drawing on a stated hourly price of 8$ and a period of 14 days. The estimate excludes storage and data transfer, and access to an additional TPU virtual machine covered only part of the project. It serves as an estimate under the stated assumptions about accelerator use.

The paper relates that expense to concerns about whether universities and companies can support this kind of training and to existing work on environmental costs. The quoted amount is a resource-price estimate. The study does not turn it into a measurement of energy consumption or emissions. Reusing checkpoints makes the adaptation possible within its circumstances, while the new training still involves image preparation, translation and accelerator access whose total cost is broader than the paper's price calculation.

Translation quality creates another constraint. The authors explicitly acknowledge that translation can introduce biases involving properties such as gender and age. A fluent translation can make choices about people that were left unspecified in the source, or express a social association more strongly than the original. Repeated choices of this kind could become part of the associations the system learns from its training pairs. The mean rating from the caption review addresses general translation quality. It provides no breakdown of how often these particular biases occur.

The authors report that CLIP-Italian exhibited stereotypes in their empirical exploration and call for closer study of them. The retrieval failure involving the mouse and hedgehog illustrates a different kind of limitation. A result can satisfy a broad resemblance even while missing the requested object. The stereotype observation and the individual mismatch show that the demo can expose behavior beyond simple benchmark success. The paper provides examples and observations rather than a systematic estimate of the prevalence or severity of these problems. Bias, fairness and safety

The authors also suggest that translation of the ImageNet labels probably affected classification results. A class name can be a very short expression, so wording choices can substantially influence the prompt made from it. Adding an article gives the translator more linguistic structure, and the photo phrase gives the system a common form for comparison. The paper's suggested explanation remains an interpretation. It does not report a controlled evaluation using alternative label translations on the same images.

Limits that follow from the evaluation setup

The strongest controlled reading of the main comparison concerns the complete systems on the two reported Italian tasks. The systems differ in their training strategies, the text representation they start from and the data used for their adaptation. The observed advantage is evidence for the combination that the authors built and tested. It does not identify Italian BERT, translation, cleaning, or the contrastive training stages as the sole source of that advantage. Isolating each factor would require comparisons that hold the other factors steady.

Similarly, the original CLIP comparison concerns experiments with different conditions. The original pretraining corpus is much larger. Its classification experiment uses English labels and a more elaborate prompt scheme. The Italian version uses automatically translated labels in a common photo phrase. Each difference offers a possible reason for different scores. The designs do not supply a way to assign a share of the difference to any one of them. The contrast is useful for placing the Italian result in context, with the mCLIP comparison providing the closer reference for the Italian evaluations.

Zero-shot accuracy in this paper tests whether the shared representation can use the supplied class prompts successfully. It does not test every alternative description a speaker might use. A translation may preserve the broad object type while making a fine category sound unfamiliar, and another phrasing could change the ranking. Since prompt alternatives were not systematically compared, the results characterize the Italian phrases in this experiment. They do not indicate how stable the predictions would be under synonyms or substantially different ways to express the same class.

In retrieval, validation on MSCOCO-IT supplies evidence for the benchmark's captions and candidate images. The same source family contributed training examples. This makes the holdout appropriate for measuring performance on that validation split, while leaving open how much the result depends on the caption style associated with the dataset. The Unsplash25K examples show application to another collection, but their selective presentation does not establish a second benchmark result. A demo query can be revealing about a particular behavior with little information about its frequency.

The interpretation of a retrieval mistake is also bounded by the candidate set and evaluation criterion. Under the benchmark, the expected response is the recorded paired image. In ordinary search, several images can satisfy a description, or the candidate set may lack a fully satisfactory image. The highest similarity score can therefore mean different things in the two contexts. The benchmark's answer is useful for making systems comparable, while judgments of suitability in open search would require their own evaluation design.

The data preparation creates another set of boundaries. Web images recovered for Conceptual Captions depend on which addresses still worked. The paper does not characterize what subject matter may have been lost among unavailable images. The WIT rule can discard a caption that identifies a visible subject accurately, and a surviving caption can contain few cues about the picture even if it uses other grammatical categories. The language check on ILPOST serves a separate purpose and tells the reader little about how well each remaining caption describes its paired photograph. These procedures improve the suitability of the inputs according to particular criteria, with visual relevance and coverage left incompletely characterized.

Finally, Italian is the adaptation the authors carry out. The paper suggests that the approach could be used for other languages and domains. Some steps, such as projecting separate visual and text encoders into a shared space, are defined broadly enough for that proposal. Other steps rely on the availability of a text checkpoint, translatable descriptions, native-language sources and computational resources. The study establishes the feasibility of its Italian combination. It leaves the performance of analogous combinations in other languages to later evaluations.

What came after

The work opened a line of comparison between adapting a visual–textual system to one language and making that kind of system useful across a broader range of inputs and tasks. The Italian paper begins with an existing image encoder and asks how to align it with a text encoder for a specific language. Its retrieval and classification experiments give that alignment a concrete purpose. The later works that cite it pursue related alignment questions with a broader scope.

InternVL focuses on scaling up visual foundations and aligning them for general visual–linguistic tasks. This takes up the alignment problem at the point where the visual representations themselves are a focus of scaling. In the Italian study the available vision checkpoint is a starting point, and the new paired corpus addresses an Italian language requirement. In InternVL the stated goal encompasses a more general range of visual and linguistic tasks. The connection is the use of alignment to make visual representations usable through language. The citation and the later work's stated focus do not establish a reuse of the Italian corpus, projections or evaluation procedures. InternVL

Large Multilingual Models Pivot Zero-Shot Multimodal Learning across Languages approaches the language question through a multilingual pivot. Its stated focus is zero-shot multimodal learning across languages. This extends the problem of using linguistic representations to reach visual capabilities beyond any one target language. CLIP-Italian demonstrates a route that assembles paired material for Italian and adapts a system to that language. The later work's focus is how multilingual representations can serve as a bridge across languages in a zero-shot setting. The relationship concerns where the cross-language connection is made, with no reported basis here for attributing a result on MSCOCO-IT or translated ImageNet to that later work. Large Multilingual Models Pivot Zero-Shot Multimodal Learning across Languages

Cite

Cite as Federico Bianchi, Giuseppe Attanasio, Raphael Pisoni, Silvia Terragni, Gabriele Sarti and Sri Lakshmi. 2021. Contrastive Language-Image Pre-training for the Italian Language. arXiv:2108.08688.

The paper itself, not this page. BibTeX from the library's record of the work. arXiv 2108.08688

@misc{bianchi2021contrastive,
  title = {{Contrastive Language-Image Pre-training for the Italian Language}},
  author = {Federico Bianchi, Giuseppe Attanasio, Raphael Pisoni, Silvia Terragni, Gabriele Sarti and Sri Lakshmi},
  year = {2021},
  eprint = {2108.08688},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.08688}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bianchi-2021-contrastive-language-image-pre-training/

References

17 references, from the paper's own bibliography.

  1. Emily M Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. 2021. On the dangers of stochastic parrots: Can language models be too big? In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, pages 610–623. OpenAlex ↗ · Scholar ↗
  2. Federico Bianchi and Dirk Hovy. 2021. On the gap between adoption and understanding in NLP (https://doi.org/10.18653/v1/2021.findings-acl.340). In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 3895–3901, Online. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  3. Federico Bianchi, Bingqing Yu, and Jacopo Tagliabue. 2021. BERT goes shopping: Comparing distributional models for product representations (https://doi.org/10.18653/v1/2021.ecnlp-1.1). In Proceedings of The 4th Workshop on e-Commerce and NLP, pages 1–12, Online. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  4. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding (https://doi.org/10.18653/v1/N19-1423). In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics. our card
  5. Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. 2021. An image is worth 16x16 words: Transformers for image recognition at scale (https://openreview.net/forum?id=YicbFdNTTy). In International Conference on Learning Representations. our card
  6. Dirk Hovy, Federico Bianchi, and Tommaso Fornaciari. 2020. “you sound just like your father” commercial machine translation systems include stylistic biases (https://doi.org/10.18653/v1/2020.acl-main.154). In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1686–1690, Online. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  7. Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. 2014. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740–755. Springer. our card
  8. Ilya Loshchilov and Frank Hutter. 2017. SGDR: stochastic gradient descent with warm restarts (https://openreview.net/forum?id=Skq89Scxx). In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net. our card
  9. Debora Nozza, Federico Bianchi, and Dirk Hovy. 2020. What the MASK? making sense of language-specific bert models. arXiv preprint arXiv:2003.02912. OpenAlex ↗ · Scholar ↗
  10. Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. 2021. Learning transferable visual models from natural language supervision (http://proceedings.mlr.press/v139/radford21a.html). In Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 8748–8763. PMLR. our card
  11. Nils Reimers and Iryna Gurevych. 2020. Making monolingual sentence embeddings multilingual using knowledge distillation (https://doi.org/10.18653/v1/2020.emnlp-main.365). In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4512–4525, Online. Association for Computational Linguistics. our card
  12. Antonio Scaiella, Danilo Croce, and Roberto Basili. 2019. Large scale datasets for image and video captioning in italian. IJCoL. Italian Journal of Computational Linguistics, 5(5-2):49–60. OpenAlex ↗ · Scholar ↗
  13. Steffen Schneider, Alexei Baevski, Ronan Collobert, and Michael Auli. 2019. wav2vec: Unsupervised pre-training for speech recognition. In INTERSPEECH. OpenAlex ↗ · Scholar ↗
  14. Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. 2018. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning (https://doi.org/10.18653/v1/P18-1238). In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2556–2565, Melbourne, Australia. Association for Computational Linguistics. our card
  15. Krishna Srinivasan, Karthik Raman, Jiecao Chen, Michael Bendersky, and Marc Najork. 2021. Wit: Wikipedia-based image text dataset for multimodal multilingual machine learning. arXiv preprint arXiv:2103.01913. our card
  16. Emma Strubell, Ananya Ganesh, and Andrew McCallum. 2019. Energy and policy considerations for deep learning in NLP (https://doi.org/10.18653/v1/P19-1355). In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3645–3650, Florence, Italy. Association for Computational Linguistics. our card
  17. Juntang Zhuang, Tommy Tang, Yifan Ding, Sekhar Tatikonda, Nicha Dvornek, Xenophon Papademetris, and James S Duncan. 2020. Adabelief optimizer: Adapting stepsizes by the belief in observed gradients. arXiv preprint arXiv:2010.07468. OpenAlex ↗ · Scholar ↗