Large-Scale Zero-Shot Image Classification from Rich and Diverse Textual Descriptions
Paper · 2021 · Sebastian Bujwid and Josephine Sullivan
Summary
An image classifier typically learns what a category looks like from labeled pictures. But pictures are costly to collect and label, and a description of a category may already exist. Can a classifier learn to recognize a type of object it has never seen in training by reading about it? Sebastian Bujwid and Josephine Sullivan study this question on ImageNet, where the candidate classes span animals, plants, objects and other concepts. Their work connects vision and language through zero-shot image classification. For the classes used in training, the system receives both pictures and text. For the classes it must recognize at test time, it receives text as the source of information about what each label means.
The paper introduces ImageNet-Wiki, a collection of correspondences between ImageNet classes and Wikipedia articles, together with the text from those articles. A name can help a system place an unfamiliar label near familiar words, but it may say little about how to distinguish the thing it denotes. An article can contain useful details about appearance even when much of its content concerns something else. The authors turn each class description into a fixed-length vector and use it with existing approaches to zero-shot classification. One is a simple system based on linear projections. The other, CADA-VAE, learns compatible image and text representations through paired autoencoders.
On ImageNet’s mp500 test split, CADA-VAE achieves a mean per-class top-5 accuracy of 50.50% with Wikipedia descriptions, compared with 38.63% using the standard class-name features. Even the simple classifier, given article features, surpasses CADA-VAE with class names. The validation experiments also show that the way text is represented matters. The best entry in the comparison uses full articles encoded by averaging GloVe word vectors. In a separate comparison with the same ALBERT encoder, full articles outperform their opening paragraphs.
The gains have a boundary. When the authors remove animal classes from training, recognition of unseen animal species deteriorates sharply, even when the system has articles describing those species. A control that removes an equal number of non-animal classes helps distinguish the effect of losing relevant training categories from that of having fewer training classes. The paper thus finds that richer descriptions improve recognition within the ImageNet setting, while transfer to a whole category with no visual counterparts in training remains difficult.
Deep dive: Large-Scale Zero-Shot Image Classification from Rich and Diverse Textual Descriptions
ImageNet-Wiki tests whether Wikipedia articles help recognize unseen image classes and how well that ability transfers across categories. · about 33 minutes to read
The problem and its context
What an unseen class can tell a classifier
Zero-shot classification changes what information is available for learning a label. In ordinary supervised image classification, the system can use pictures of a target class to learn which visual patterns are associated with that class. In the zero-shot task, the target classes are held out at the class level. The system can study labeled pictures of other classes, and it can see auxiliary information about the target classes. The challenge is to use the relationship learned from the available pictures and their descriptions to make sense of descriptions that have no corresponding training pictures.
Consider the paper’s example of a lion. ImageNet identifies the class through a WordNet entry with several names and a short definition. The names identify the concept. The definition describes aspects of its appearance, including coat color and the male’s mane. Both are text, yet they offer different evidence to a classifier. A name can provide a useful clue through its relationships with other words. A description can give the system vocabulary for features that also occur in pictures. Those phrases become valuable to the extent that training establishes a connection between the text and the visual patterns.
The distinction matters because zero-shot recognition still depends on what the system learned from labeled images elsewhere. A written description can refer to an unfamiliar combination of familiar visual properties, or it can refer to properties that the training classes rarely exemplify. Holding out a lion class while keeping training classes for other animals probes a different kind of transfer from holding out the lion class and removing animals from training altogether. In both cases the lion pictures are unseen. The prior visual experience available for interpreting the description differs.
Bujwid and Sullivan frame this as a question about sources of training information as much as a question about classification algorithms. Pictures, labels, curated attributes and published prose differ in the effort needed to obtain them. If a body of text already describes the classes a system must recognize, using it could save the work of building a separate attribute inventory for those classes. This becomes important as the intended label set grows and distinctions between some of its members become finer.
What researchers used before
The paper traces the definition of zero-shot learning to Larochelle and colleagues. It describes much subsequent work as relying on class attributes, especially on benchmarks covering a limited domain. Examples include CUB, which contains birds, and AwA1 and AwA2, which contain animals. Other benchmarks cover flowers, scenes or a mixture of kinds of objects. Their different scopes matter because an attribute inventory designed for a family of closely related classes can emphasize distinctions that an inventory for a broader collection would also have to represent alongside many unrelated properties.
Expert-defined attributes offer a direct way to tell a system something about appearance. A suitable attribute can separate classes that look similar in other respects. The authors also point to costs that grow with the scope of the dataset. Experts have to identify the relevant properties, decide how to represent them and annotate the classes. A property may apply only under certain conditions. The paper illustrates this with the colors of a zebra’s stripes at birth, where the animal’s age affects the description. Combining independently annotated datasets creates another problem when their attribute vocabularies differ.
ImageNet lacks the sort of attribute annotations used in many of the smaller benchmarks discussed in the paper. Earlier ImageNet experiments often used word embeddings of class names. A word embedding is a numerical representation learned from patterns in text. It gives the classifier a way to relate labels even when it lacks training pictures for some of them. Computing or reusing a vector for a label takes little annotation work. The relationship between label wording and visual similarity can nonetheless be uneven. Different concepts can share a word, and names need not express the properties that distinguish what the objects look like.
The standard ImageNet class-name vectors were themselves learned from Wikipedia data. The authors’ question is therefore more specific than whether Wikipedia is a useful source. They ask whether attaching an article to the class and encoding what the article says gives a classifier more usable evidence than taking a vector for the words in its name. The name vector reflects patterns acquired during pretraining. The article vector also depends on which text was selected to describe the meaning of that particular label.
Texts longer than a label had already been used for zero-shot recognition. Reed and colleagues collected short sentences describing images in bird and flower datasets. Elhoseiny and colleagues studied Wikipedia articles for bird species, including on CUB and NABirds. The authors cite work by Zhu and colleagues and by Chen and colleagues as further evidence that textual descriptions can be useful. As Bujwid and Sullivan describe this line of research, its experiments concentrated on smaller collections of closely related classes. Their question is how the approach behaves across the broader range of ImageNet.
Why the breadth of ImageNet matters
The paper contrasts the benchmarks by both their subject matter and their size. CUB has 200 classes covering birds, and NABirds has 1,011 classes covering birds. The ImageNet-Wiki training side has 1,000 classes and 1.3M images, spanning animals, plants, objects and other concepts. A benchmark can therefore contain many named classes while still drawing those classes from a single broad domain. That distinction determines what a successful test says about generalization.
Within a specialized domain, a classifier may be able to reuse associations learned from closely related categories. In a diverse benchmark, the experiment can deliberately remove a family of related classes and then ask whether text can compensate for the missing visual experience. The WordNet hierarchy gives the authors a means of defining such groups independently of the recognition results. It also lets them examine relationships between individual seen and unseen classes whose labels may be separate in ImageNet but whose descriptions rely on much the same source material.
Wikipedia articles bring their own tradeoff. Existing articles are relatively easy to collect, can be combined with prose from elsewhere and may contain information that would be expensive to elicit as attributes. They also vary in length and subject matter. Much of an article can describe matters a classifier cannot observe in an image. The task therefore asks whether general-purpose text representations retain enough of the visual evidence in the prose to be useful when the system compares an image with an unfamiliar class.
The method, step by step
From a class identifier to a description
ImageNet classes correspond to noun senses in WordNet 3.0. WordNet organizes these senses into synsets, groups of names that identify the same concept in that entry. A class has a WordNet identifier, a set of names and a gloss, or short definition. It also has a position in the WordNet hierarchy. The lion entry, for example, falls under broader concepts for big cats and animals. The identifier and definition specify which sense is meant when the words in the name can be used in several ways.
The authors use a snapshot of English Wikipedia, enwiki-20200120, to find articles for those senses. Their automatic correspondence process considers the resemblance of WordNet names to article titles along with information about broader categories. They compare the resulting matches with correspondences from earlier work by Niemann and Gurevych and by Matuschek and Gurevych. They then check the matches by hand and make corrections where needed. They note that filtering out irrelevant articles can matter as much as the precise matching method.
The paper’s example of sorrel shows why the checks matter. One ImageNet class refers to a horse with a particular coat color. A Wikipedia page for the herb with the same name would supply a fluent and detailed description of the wrong object. A more sophisticated text encoder would still be working with the wrong evidence. The dataset construction therefore has to solve a problem of meaning before the classifier can use the prose as visual evidence.
Appropriate matches need not have the same scope as a WordNet entry. A class for a car mirror, for instance, is linked to articles about rear-view and wing mirrors. In the other direction, classes for mountain tents and backpacking tents can both point to the article about tents. A broader article may genuinely describe both classes while offering little help in distinguishing them. ImageNet-Wiki records correspondences of this kind, which the authors later use to investigate the role of similarity between training and test labels.
The authors call the resulting collection ImageNet-Wiki. It includes ImageNet classes, their Wikipedia correspondences and the extracted text. The paper makes the dataset, code and trained weights available. Its experiments use the correspondences to create class vectors before training the zero-shot classifiers.
From ImageNet classes and pictures to zero-shot predictions
The steps in order.
Turning long articles into vectors
The classifiers expect a vector of fixed length for each class. One article can run far longer than another, and a class may be linked to several articles. The authors therefore apply an encoder to the text and aggregate its outputs into a single class representation. The same procedure can be applied to seen and unseen classes. The unseen side needs a description, but the process can construct its class vectors before any test images are classified.
For GloVe and word2vec, the authors use official pretrained word vectors. They divide the text into tokens, retrieve an embedding for each token and average the embeddings across the sequence. Each feature in the result summarizes a dimension of those word vectors over the document. Since averaging discards word order, any advantage from the article under this representation comes through the aggregate contribution of its vocabulary. Relationships such as which object has which property are harder to retain in that form.
For ALBERT, the authors use pretrained variants of an encoder based on the Transformer. ALBERT-base has a hidden layer size of 768, and ALBERT-xxlarge has a hidden layer size of 4096. A hidden state is the vector the encoder computes at a token position. In this case it can reflect surrounding tokens as well as the token at that position. The authors use hidden states from the last layer to represent the text.
ALBERT has a fixed-size learned representation of token positions, which constrains how much text can be processed at once. Each article is split by the authors into 256-token sequences, with 50 tokens shared between adjacent sequences. The overlap gives the neighboring sequences some shared context at their boundary. They encode each sequence independently, then average the last-layer hidden states across its tokens. They average those sequence-level vectors to represent the article. The method can process a long page through this sequence of operations, although a token’s context during encoding is limited to the segment being processed.
When there are multiple Wikipedia pages for a class, the authors average the article representations. This gives each matched article a contribution at the level of its vector, even if the articles differ in length. The result has the same number of dimensions whether the class is linked to one page or several. The article encoding comparisons also examine the special ALBERT [CLS] output and summing vectors across articles. Averaging at the token and page levels is the ALBERT procedure carried into the main experiments.
There are two distinct uses of word2vec in the paper. The standard class-name features, marked word2vec*, have 500 dimensions. They come from Changpinyo and colleagues and were trained on Wikipedia. For the article encodings labeled simply word2vec, the paper uses the standard pretrained 300-dimensional vectors from Mikolov and colleagues. The GloVe vectors used for the article encodings also have 300 dimensions. The distinction is important because changing from the class-name baseline to an article feature can change both the input text and the pretrained vectors used to represent it. Validation comparisons that keep the encoder fixed help separate those choices.
Representing the images
The image side uses 2048-dimensional features supplied by Xian and colleagues. A ResNet-101 pretrained on the ImageNet ILSVRC 2012 classes produces those features. The authors describe the features as coming from the last layer before pooling. They use the same visual features throughout the experiments, and the zero-shot training procedures leave both the visual and auxiliary features fixed.
Keeping these inputs fixed makes the comparison easier to interpret. A change to the auxiliary data affects the information supplied to the classifier through its text input. Training can change how that information is aligned with the visual representation, while the feature extractor continues to describe each picture in the same way. The design also means that visual pretraining determines which image properties the later alignment procedure has available to work with.
Simple ZSL learns to rank the class descriptions
The Simple ZSL classifier is inspired by DeViSE. It learns a separate transformation for the image vector and the auxiliary-data vector so that the resulting vectors occupy a joint space. Unlike the original DeViSE approach as described in the paper, the visual feature extractor is left fixed. The classifier learns from examples in which it knows both the image’s correct label and the text feature for each candidate training label.
φₓ(x) = Wₓ x + bₓ
Here x is the input feature vector for an image and φₓ(x) is its representation in the joint space. Wₓ is the trainable matrix that maps the input coordinates to the output coordinates. bₓ is a trainable offset vector added after that multiplication. The subscript ₓ denotes the visual branch.
φₜ(tᵢ) = Wₜ tᵢ + bₜ
Here tᵢ is the auxiliary feature vector for class i, such as the vector derived from its article text. φₜ(tᵢ) is its representation in the joint space. Wₜ is the trainable matrix for auxiliary features, and bₜ is the corresponding trainable offset. The subscript ₜ denotes the text branch. Its output has the same dimensionality as the visual branch’s output, so the two can be compared.
Σᵢ₌₁,…,K; i≠y max(0, m − φₓ(x)ᵀ φₜ(tᵧ) + φₓ(x)ᵀ φₜ(tᵢ))
This is the loss for a training example. K is the number of classes in the training problem, and y is the correct class index, with values from 1 to K. Σ adds a term for each candidate class index i other than y, as indicated by i≠y. The ellipsis denotes the intervening indices in that range. tᵧ is the auxiliary vector for the correct class, and tᵢ is the vector for the current competing class. φₓ and φₜ are the two transformations above. The superscript ᵀ transposes the projected image vector so that multiplication by a projected class vector gives a dot product. m is a non-negative scalar margin, the separation the loss seeks between the two scores. max selects the larger of 0 and the margin expression, giving a competitor a zero contribution when the separation already meets the margin. The minus sign subtracts the correct-class score, and the plus sign adds the competing score.
This is a hinge loss because the penalty changes behavior at the required margin. A wrong candidate that scores too close to the right label incurs a cost, even if the right label already ranks higher. A candidate that ranks above the right label incurs a cost as well. Training uses these penalties to adjust both projections. At test time, the system projects the unseen class descriptions and the test image, then uses nearest-neighbor comparison in the joint space to find candidate labels.
The reuse of the text transformation is what makes this a zero-shot classifier. It can project a feature vector for a class that was absent from the supervised training pairs. The quality of that projection depends on whether the learned weights give suitable importance to components of the new class’s description. An article makes more words available, but training still has to make its accompanying vector comparable to the test image.
CADA-VAE learns a common latent representation
CADA-VAE begins with two variational autoencoders. One works on the pretrained image vectors. The other works on the auxiliary class vectors. An autoencoder learns an internal representation and uses it to reconstruct an input. In the variational version, the encoder describes a distribution in that internal space, so vectors can be sampled from it. The internal representation is called latent because it is learned from the data as part of training.
CADA-VAE seeks to align the latent spaces of the two branches. The image of a seen class and the auxiliary description of that class should yield representations that agree closely enough for a classifier learned from one source to operate on the other. The training settings include a cross-reconstruction term and a distribution-alignment term. Cross reconstruction helps make representations useful to the other branch. Distribution alignment directly encourages the visual and auxiliary representations to be compatible. The authors use schedules that increase the weights on these terms over parts of training.
After the autoencoders are trained, the authors pass the descriptions of the unseen classes through the auxiliary branch and sample latent vectors for each class. They train a linear classifier on those sampled vectors and their class labels. Appendix settings specify 200 sampled latent vectors from each class. These vectors come from the descriptions. At test time, the image branch supplies latent features in the same space, and the classifier trained on the text-derived samples scores them. This is how the system can fit a classifier over unseen labels without first seeing example photographs of those classes.
The authors implement CADA-VAE themselves and check that its behavior is similar to that of the original implementation. They report two differences. Their implementation averages the loss over a batch where the original summed it. They also change the conversion from log variance to standard deviation used when drawing latent samples. The paper says the original implementation appears to omit the factor used in the following expression.
σ = exp(0.5 · log(σ²))
σ is the standard deviation of a latent variable, and σ² is its variance. log takes the natural logarithm, so log(σ²) is the log variance. The multiplication sign · applies the factor 0.5 to that log variance. exp exponentiates the result, giving the standard deviation needed for sampling. This is a detail of the CADA-VAE implementation used to compare auxiliary data.
Selecting training settings
The authors select hyper-parameters, settings chosen outside the main fitting procedure, using the training and validation classes. Each candidate configuration is fitted on the training classes and assessed on the validation classes. Separate tuning allows factors such as the projection dimension to suit the input representation a classifier actually receives. For the method and feature combinations described in the training appendix, the authors detail random searches and, for CADA-VAE, additional manually investigated settings.
For Simple ZSL the appendix specifies 40 configurations per variant in its search for the standard word2vec class-name features and the two ALBERT article encodings. The search covers batch size, projection dimension, the hinge margin and settings for the Adam optimizer. The CADA-VAE appendix describes 42 random-search runs per variant, exploring factors such as the latent dimension, the encoder and decoder layer sizes and the loss weights. It also describes extra trials whose counts differ by feature variant. These settings are selected on validation performance. In the final training stage the zero-shot methods are fitted on the combined training and validation classes and evaluated on the held-out test classes.
Experiments and results
The splits and what counts as correct
The experiments follow the class splits of Xian and colleagues. In the validation setup, 750 ImageNet classes serve as seen training classes and 250 as unseen validation classes. These classes all belong to the ILSVRC data used to pretrain the visual feature extractor. The zero-shot classifier is trained without validation classes in that stage, but the image encoder already has experience with their categories. The authors use this split to select settings and to compare text representations.
For the final test, they combine the 750 training classes with the 250 validation classes to form the set of 1000 seen classes. The system is then evaluated on mp500, which consists of the 500 most populated classes in that test split. The test classes are separate from the classes used to train the image feature extractor. This makes the final result the relevant estimate for the paper’s main zero-shot task.
ImageNet-Wiki provides article features for 489 of the 500 mp500 classes. In the main comparison, the authors assign article-based systems an accuracy of 0 on the classes with missing features. This keeps those classes in the benchmark average. A system that can only construct representations for the covered classes therefore pays a penalty for the gaps. The paper separately reports analyses of the subset with article coverage, which answer a different question about accuracy when the description is available.
The metrics are mean per-class top-1 and top-5 accuracy. Top-1 gives credit when the highest-ranked label matches the image’s class. Top-5 gives credit when the correct label appears within the first five predictions. To compute the mean per-class accuracy, the authors first calculate the accuracy of each class and then average across classes. Images from a class with many examples therefore contribute to that class’s estimate without giving it extra weight in the final mean.
The task uses the standard zero-shot candidate set. At test time, the classifier ranks unseen labels, and its test images belong to those labels. Generalized zero-shot learning also allows seen labels as possible predictions. The authors choose the standard setting because it provides a more direct comparison of how well each type of auxiliary information separates the unseen classes. A generalized experiment would additionally test how the system balances its scores for familiar and unfamiliar labels.
What the validation comparisons establish
The validation experiments compare full Wikipedia articles, the text before an article’s first section, WordNet glosses and class names. They also compare several ways to encode those sources. The distinction is useful because an improvement on the main test could reflect the breadth of the text, the encoder, or both. The validation rows include comparisons where the encoder remains the same while the input changes.
Auxiliary text and encoder choices on ImageNet validation by mean per-class top-5 accuracy
Full articles work well with several encoders and reach the highest accuracy with GloVe.
The numbers
| System or setting | mean per-class top-5 accuracy % |
|---|---|
| Standard word2vec class names | 61.91 |
| ALBERT-xxlarge article openings | 52.84 |
| ALBERT-xxlarge full articles | 64.92 |
| GloVe class names | 59.26 |
| GloVe class names and glosses | 65.47 |
| Word2vec full articles | 72.80 |
| GloVe full articles (this paper) | 77.96 |
The top-1 metric also favors articles in the main validation comparisons. With full articles, GloVe gives 40.24% mean per-class top-1 accuracy, word2vec gives 36.14%, and ALBERT-xxlarge gives 31.29%. When the input to ALBERT-xxlarge is the article opening alone, the result is 22.71%. Applying the same encoder to both versions narrows the interpretation of that comparison. The additional material in the body of the article helps under the paper’s encoding and training procedure.
The validation table also gives a way to inspect shorter alternatives. Under GloVe, class names reach 29.47% mean per-class top-1 accuracy, glosses reach 22.41%, and the combination reaches 33.26%. Full articles reach the highest value in that group. The gains from adding a gloss to a name indicate that the result is sensitive to small amounts of explicit descriptive information as well as to full articles. The gloss by itself and the name on its own can preserve different cues, so their combination is a distinct auxiliary input.
The contextual encoder’s validation results also depend strongly on what it receives. ALBERT-xxlarge yields 14.19% mean per-class top-1 accuracy for class names, 19.67% for glosses and 21.38% for names combined with glosses. The authors point out that ALBERT was designed to handle longer sequences. A label that consists of little contextual material is a particularly restrictive input. The wider finding is specific to the feature extraction in the paper. It describes the results of pretrained ALBERT with the chosen aggregation and the performance of pretrained word vectors when pooled across articles.
The main comparison on mp500
The test experiments compare Simple ZSL with CADA-VAE, each given auxiliary data for the classes it must learn about. The reference input is the standard word2vec class-name representation. The article alternatives include both ALBERT variants and features based on GloVe or word2vec. The image features, class splits and test metrics provide a common basis for the comparison. In the main results table, the means and standard deviations are calculated across five training runs, each using a different random seed.
Class names and Wikipedia articles with CADA-VAE on ImageNet mp500 by mean per-class top-5 accuracy
CADA-VAE ranks the correct unseen class among its leading predictions more often when it receives article descriptions.
The numbers
| System or setting | mean per-class top-5 accuracy % |
|---|---|
| Standard word2vec class-name features | 38.63 |
| Wikipedia article features (this paper) | 50.50 |
The CADA-VAE result compares the same method with different sources of auxiliary data. It shows how much the result can change when a method gets a richer account of the labels. The contrast between Simple ZSL and CADA-VAE makes a related point. With article features, the simple method surpasses CADA-VAE trained with the class-name features. A classifier that learns little more than how to project each modality into a common space can use information in article text that is difficult to recover from the labels alone.
The paper also compares its best variants with earlier zero-shot results reported by Xian and colleagues on mp500. The comparison uses the same general setup, including the visual features, splits and standard word2vec class-name vectors for the systems that use class names. The article-based variants outperform the earlier methods in that comparison. This result concerns the mp500 benchmark under the paper’s experimental protocol. Its strength is that the improvement appears both in a controlled change to CADA-VAE’s input and in a comparison between classifiers of different complexity.
The main table and the analyses of class overlap use different summaries of performance. The class overlap analysis records single runs for particular CADA-VAE variants. Its all-class top-5 values are 44.03% for ALBERT-xxlarge Wikipedia features, 50.49% for GloVe Wikipedia features and 39.07% for word2vec class names. The 50.50% and 38.63% results in the main comparison refer to the headline evaluation. The single-run values provide a starting point for reading the changes within the overlap analysis, where the questions concern what happens when particular test classes are left out of the average.
What the scores tell a reader about recognition
In this task, an image can yield a useful ranking even when the highest-ranked label is wrong. If a picture of a specific kind of furniture is assigned another kind of furniture, the relevant class may still occur among the leading alternatives. Top-5 recognizes that behavior when the correct label is in range. Top-1 asks the stricter question of whether the classifier has made the final distinction. The two metrics are particularly informative together in a benchmark that contains related classes, because broader visual similarities can support a good shortlist while leaving fine distinctions unresolved.
The paper’s mean per-class metrics summarize a diverse collection. A higher mean says that the correct classes appear in the required ranking positions more often on average, with each test class receiving equal weight. It leaves open how the gains are distributed across class families and how much the classifier depends on having seen visually related concepts during training. The subsequent experiments change the training composition or inspect selected parts of the test set to investigate these issues.
What the ablations show
How much text to read
The cleanest validation comparison of text scope uses ALBERT-xxlarge for both the opening paragraphs and full articles. The opening paragraphs are the text before the first section begins. They tend to introduce the topic in a relatively compact space, while the full article can include detailed descriptions along with material that has little relevance to recognition. The full article gives higher validation accuracy on both metrics. For the class vectors constructed here, the content beyond the opening supplies useful evidence often enough to improve the average.
A separate set of comparisons investigates whether the shorter WordNet descriptions are useful. With GloVe, adding a gloss to the class name improves both metrics over the class name alone. Full articles perform better still. With ALBERT-xxlarge, moving from names alone to glosses or to names plus glosses also improves both metrics. These results triangulate the distinction between an identifier and a description. Even concise definitions can carry useful evidence, and broader coverage of the subject proves valuable in the configurations tested.
The same findings put the word-embedding advantage in context. A vector produced by mean pooling can benefit from the vocabulary of a detailed description even if it loses the relationships among those words. GloVe and word2vec perform well enough on full articles to show that this simple representation captures useful information in the prose. The experiments leave room for an encoder that can preserve more structure while making the visually relevant pieces easier to recover.
How to pool ALBERT features
The paper examines two choices within ALBERT-xxlarge. The first is which output represents each sequence. The second is how to combine page vectors for classes linked to several articles. The Wikipedia variants in this comparison use the same other settings, selected for the configuration that averages token states and averages page vectors.
ALBERT-xxlarge pooling choices on ImageNet validation by mean per-class top-5 accuracy
Averaging token states and then averaging page vectors gives the best result among the ALBERT pooling choices.
The numbers
| System or setting | mean per-class top-5 accuracy % |
|---|---|
| Classification output and mean across pages | 12.45 |
| Mean over tokens and sum across pages | 62.44 |
| Mean over tokens and mean across pages (this paper) | 64.92 |
ALBERT provides a special [CLS] output intended for classification uses. Here the representation has a different role. It serves as a fixed vector for a stretch of text that another system must align with the visual features of a class. Averaging the token states yields 31.29% mean per-class top-1 accuracy on the validation classes. Using [CLS] with the same method of averaging across pages yields 3.24%. The very low [CLS] result pertains to the fixed, pretrained feature and the other settings used in this experiment.
Keeping the token average and summing the vectors across pages instead yields 29.77% mean per-class top-1 accuracy on validation. A sum can change a class vector’s magnitude according to how many articles were assigned, while a mean keeps the vector on the scale of the average page. That is one reason the aggregation rule could affect downstream matching. The experiment establishes the ordering under the selected settings, while leaving the exact cause of the difference open.
Removing a whole category from training
ImageNet’s hierarchy allows the authors to group the training and test classes into animals, plants and a remaining partition. The evaluation first asks how CADA-VAE performs on unseen classes within each grouping under different training conditions. It then asks how far that performance depends on having classes of the same broad kind in the training data.
For the animal experiment, the authors remove the animal classes from training. As a control, they remove an equal number of randomly selected non-animal classes. Both procedures withhold the same number of classes, but only the first eliminates visual examples of the entire animal group. They apply the same experimental idea to plants. After fitting the systems under these conditions, they examine mean per-class top-5 accuracy separately for the mp500 groups. The plotted values are from a single run per configuration.
The most pronounced pattern occurs for animals. The classifier recognizes novel animals much less successfully when all the training animals are removed. This deterioration appears with different sources of auxiliary data, including the Wikipedia articles. The descriptions of the target species are still available to the system. The altered factor is the set of seen classes from which the zero-shot method can learn how text and image features correspond. The random-removal control shows why preserving the nature of the training classes matters, even when the number of classes retained is held constant.
The plant results are weaker in absolute terms than those for the more populous animal group. The authors suggest the smaller set of plant classes in training as a possible reason for that difference. The supplementary comparisons also show a less pronounced version of the deterioration for classes in the remaining group when related training coverage is reduced. The category experiments give a clearer finding about the fragility of animal transfer than about a general ranking of categories by difficulty.
These experiments ask a different question from the headline comparison. A standard split already requires prediction of labels that have no corresponding training images. The removal experiment makes the target more remote by withholding a broad set of potentially relevant visual examples. Under that condition, textual information about the unseen labels can supply their descriptions, but the learned bridge from language to vision still needs associations that generalize to those descriptions. The animal result shows how sharply that bridge can weaken.
Discounting overlaps between seen and unseen classes
WordNet and Wikipedia define concepts at different levels of detail. That creates similarities that the official split between ImageNet labels does not reflect directly. A mountain tent and a backpacking tent are distinct class labels. If both point to the same Wikipedia page, the information supplied through their auxiliary vectors can be identical. Class names can also share a phrase. The paper gives the example of a doorbell class and a chime class whose lists of names both contain bell.
The authors examine the effect of such overlap on the result. They take CADA-VAE systems already trained for the full unseen task and report their accuracy on subsets of mp500. The exclusions look for test labels without matching articles, test labels that share the same set of matched articles as a seen label, test labels with any article overlap and test labels with an overlapping WordNet name. A further criterion combines the identical article-set and name-overlap tests. Each criterion defines which test classes contribute to the reported mean.
The distinction between identical sets and any overlap matters when a class has multiple descriptions. A wagon wheel, for instance, is linked to articles about wagons and wheels, while a car wheel is linked to the article about wheels. The article sets differ, but both descriptions can draw on the wheel article. An exclusion based only on identical sets would keep that test class. The broader exclusion removes it. In this way the paper tests both a strict definition of sharing the same description and a more inclusive definition of sharing some of the source material.
The row that removes classes without articles retains 489 test classes. In that subset, the ALBERT-xxlarge article variant reaches 45.02% mean per-class top-5 accuracy, GloVe articles reach 51.63%, and the word2vec name variant reaches 39.00%. Removing test classes that share the entire set of articles with a seen class leaves 459 test classes. The corresponding top-5 accuracies are 42.63% for ALBERT-xxlarge, 49.82% for GloVe and 39.04% for word2vec class names. The two article variants show a decline under this closer-overlap filter.
With any article overlap excluded, 439 classes remain. GloVe articles yield 48.38% mean per-class top-5 accuracy, ALBERT-xxlarge articles yield 40.64%, and word2vec class names yield 38.60%. In the row combining identical article sets with name overlap as grounds for exclusion, the GloVe article result is 49.76% and the class-name result is 38.35% on the same top-5 metric. The article advantage therefore survives the paper’s explicit filters for shared auxiliary information.
These comparisons help interpret the original split. Recognition can be easier when test labels have descriptions closely related to seen labels, and the average on a subset can fall when those cases are removed. The result is an analysis of performance on differently composed subsets of the test classes. The authors do not fit a fresh classifier for each row or replace the descriptions. Changes in the makeup of the test subset can include differences in visual difficulty as well as differences in textual overlap. The chart of category removals addresses training composition separately.
Looking at confusions and article length
The paper examines errors with confusion matrices. A row stands for an image’s true class and a column stands for the predicted class. Normalizing within each row yields the share of the true class’s predictions that go to each label. When the diagonal is prominent, more predictions stay with their true labels. Off-diagonal entries reveal which concepts are being confused.
To make part of the large matrix readable, the authors select a class and show others that are often confused with it by the tested systems. The main example concerns furniture. The article-based CADA-VAE variants show a clearer concentration on the diagonal in this example, with many off-diagonal entries close to zero. A supplementary comparison shows a noisier subset involving insect species. Many of the errors there still occur among similar classes. These displays illustrate what the aggregate change in accuracy can look like for related labels. Their selection procedure deliberately surfaces classes with mutual confusions, which makes the aggregate metrics the better source for the typical size of the gain.
The authors also compare article length with mean per-class top-5 accuracy for the CADA-VAE variant using ALBERT-xxlarge features. The analysis considers the animal, plant and remaining groups separately. It measures the text’s length in characters and adds the lengths of the pages when a class has multiple correspondences. The plots use a logarithmic length scale. Longer articles tend to be associated with higher accuracy, and the authors describe the tendency as weak.
This length analysis asks which classes have better outcomes with the descriptions they already possess. The comparison of full articles with their openings asks what happens when the same encoding procedure is given a larger portion of an article. Together they suggest that useful information can lie deeper in a page. Article length itself remains an imprecise measure of that information, since extra prose can include useful appearance details or material a picture cannot reveal.
Limitations
Limits identified by the authors
The authors expect the approach to depend on the quality and coverage of Wikipedia. They test an association involving article length, but they do not directly measure the effect of general article quality. A detailed page may devote more of its text to facts that are visually useful, while another long page may focus on other aspects of the subject. Applying the same procedure to concepts that Wikipedia covers sparsely may yield class vectors with less useful evidence.
Class-to-article alignment also places a limit on the general approach. The authors find correspondences for most classes they consider, with incomplete coverage on mp500. The class and the available article can differ in granularity even when they refer to closely related concepts. A class can call for a distinction that Wikipedia handles inside a broader article, or several pages may cover its aspects separately. The matching checks address avoidable mistakes, such as selecting the wrong sense of a name. They cannot ensure that every valid article describes the exact distinctions the image task requires.
The authors also point out that their methods rely on pretrained, off-the-shelf features. The prose is long and complex, and visually relevant information can occupy only a small portion of it. Averaging the representations makes them compatible with existing classifiers and provides a useful baseline. It can also reduce the influence of a rare but highly discriminative detail. The authors leave open how much more of the text could be used by a method designed to extract visual evidence directly.
Their evaluation covers mp500 among the established ImageNet test splits. Extending the work to other splits requires collecting the corresponding articles for more classes. The reported benchmark improvement establishes the performance on the split they evaluated, while the category-removal results establish a difficulty within that setting. The authors treat broad transfer to an unseen family of classes as an open challenge.
Limits visible in the evaluation design
The validation split is unseen for the zero-shot training procedure, but its classes helped train the visual feature extractor. The paper explicitly identifies this as a violation of the zero-shot assumption for validation. A feature extractor familiar with those visual categories can make it easier for a downstream system to distinguish them. The validation figures should therefore be read as comparisons for choosing representations and settings. The held-out mp500 scores address the main test with classes outside that feature extractor’s supervised training labels.
The main results also concern recognition among unseen options. The score for selecting the right mp500 label tells us how the classifier ranks novel labels against one another. It does not measure the extra task of assigning scores to seen and unseen classes on a common scale. This especially matters for interpreting CADA-VAE, whose original setting was generalized zero-shot learning. Its use here shows how the auxiliary data work when the downstream classifier is built for unseen classes, and the paper expressly selects that condition to reduce the role of bias toward familiar classes.
Another distinction concerns the source of the gain. The most direct test comparisons substitute article features for standard class-name vectors. They may change the pretrained encoder, its dimensionality and the text at the same time. The validation comparisons partly address this by holding the encoder fixed while changing its input. Together the results support the value of the descriptions as represented in the paper. They do not assign a separate causal contribution to every feature choice for the final mp500 outcome.
The breadth of Wikipedia text also creates an interpretive limit. Success can depend on words for visual properties, on relationships between the classes discussed in an article, or on terminology shared across articles about similar concepts. The overlap analysis removes some readily identifiable instances of sharing between the training and test classes. A pair of classes with separate pages and different names can still have closely related descriptions. The experiments show how well the resulting representations support predictions, while identifying which passages or properties caused a particular prediction would require a more targeted analysis.
The category-removal control establishes that composition matters beyond the number of classes removed. It does not give a single measure of the semantic distance that determines how much a class will suffer. Broad groups contain many kinds of variation, and the removal operation changes which visual characteristics and text associations are available together. Additionally, the image features remain fixed from pretraining on ILSVRC 2012. Removing a category in this experiment removes it from the seen classes used to train the zero-shot method. It does not rerun visual pretraining with that category removed. The result is consequently about how the cross-modal training procedure depends on relevant classes, given the visual representation used in the paper.
Finally, the main accuracy estimates summarize repeated training runs, whereas the category and overlap comparisons describe single runs for the reported settings. The consistency of the large animal decline across auxiliary inputs supports the paper’s interpretation. The single-run design gives less information about the stability of smaller differences, especially between subsets that contain different mixes of classes. The clearest claims are that article descriptions improve recognition on mp500 and that removing the relevant broad category from zero-shot training greatly weakens transfer to unseen animals.
What came after
The paper makes ImageNet-Wiki available for further study. Its conclusion identifies ways the article collection could be used beyond the comparisons reported here. One is to develop text encoders that can distinguish evidence about appearance from the other information an article contains. The existing experiments give that direction a concrete starting point. Full articles contain useful information beyond their openings, and simple pooling already recovers enough of it to improve the benchmark. The amount of visual evidence that a more selective representation could recover remains an open empirical question.
The authors also identify visual pretraining as a possible use for the descriptions. They discuss work by Desai and Johnson and by Radford and colleagues as examples of learning visual representations through language supervision. In the experiment at hand, the image features were already learned, and the Wikipedia text helped connect those features to class labels. Using descriptions during visual pretraining would put the text earlier in the learning process, where it could influence the visual features themselves. The paper presents this as a possible direction for the released data.
A subsequent study using ImageNet-Wiki would also have to confront the gap between recognizing an unseen class and transferring to an unseen family of classes. The train-category removal experiments give a way to pose that question separately from the benchmark average. They make it possible to ask whether a gain from better text extends to labels for which the cross-modal learner had few relevant examples. No follow-up study is documented here that establishes how later work used ImageNet-Wiki or resolved that transfer problem.
Cite
Cite as Sebastian Bujwid and Josephine Sullivan. 2021. Large-Scale Zero-Shot Image Classification from Rich and Diverse Textual Descriptions. Proceedings of the Third Workshop on Beyond Vision and LANguage: inTEgrating Real-world kNowledge (LANTERN).
@inproceedings{bujwid2021large,
title = {{Large-Scale Zero-Shot Image Classification from Rich and Diverse Textual Descriptions}},
author = {Sebastian Bujwid and Josephine Sullivan},
booktitle = {Proceedings of the Third Workshop on Beyond Vision and LANguage: inTEgrating Real-world kNowledge (LANTERN)},
year = {2021},
url = {https://aclanthology.org/2021.lantern-1.4/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bujwid-2021-large-scale-zero-shot-image/