Paper: Embracing Diversity: Zero-shot Classification Beyond a Single Vector per Class (ICLR-2024)

Reviewer comment (Presentation):
I think figure 4 is misleading. The idea is by using subclasses, the majority of close subclasses should be from the correct major class (correct me if I am wrong). However, this figure does not show the two atypical classes have more close subclasses that make the two classes be classified to the correct class.

Author response:
Your intuition is very close to correct. One added detail, as shown in figure 4, is that our consolidation method allows for an atypical subpopulation to be classified correctly even when it is far from most subpopulation embeddings for that class. This property is unique to our consolidation method: using a single vector (either by not including attributes or by averaging over attributes), a sample is penalized if it is far from most subpopulations, even if the subpopulation it belongs to happens to be very different from all other subpopulations (like the Arctic fox or Red wolf).  In figure 4, we use $k=1$, which means that a sample only needs to be close(st) to one subpopulation from its true class in order to be correctly classified. We use $k=1$ for simplicity in Figure 4, and discuss the choice of $k$ in depth in Sec 5.4.

Reviewer comment (Experiments):
The preparation of subclasses for each class may require even more effort than preparing hierarchical datasets or traditional attribute learning datasets.

Author response:
In practice, hierarchy or attribute labels are not available. Thus, one must infer them. Doing so manually is costly, and even prohibitively so when the number of classes grows, or when you consider as many axes of variation as we do. In contrast, our method is fully automatic, allowing for the attribution of dozens of classes along many axes of variation to be done in just tens of minutes. Specifically, we timed how long it took to generate LLM responses to all queries in our method over multiple datasets, and found that **on one GPU (no parallelism), our attribution takes roughly 18.5 seconds per class**.  Thus, attributing datasets with 30 classes takes only about 10 minutes, and this number can be sped up by parallelizing. Crucially, this is done only once per classification task. Therefore, the computational cost per test image to classify is nearly equivalent to standard zero-shot classification.

Reviewer comment (Evaluation):
(W1) The performance improvement from the proposed approach is far from substantial. In many cases, the performance is almost equivalent to WaffleCLIP, which uses completely random text sequences.

Author response:
(W1) First, we note that despite WaffleCLIP’s simplicity, it is a recent and strong baseline. In all settings we study (hierarchical, states, real-world geographic diversity), we improve accuracy over WaffleCLIP. In fact, aside from GeoDe where there are fewer errors to correct, we improve accuracy by at least 0.9% for each setting (tables 1,2). These consistent gains also hold when using a different VLM (BLIP-2), where we improve by at least 0.8% for every setting aside from GeoDe (tables 7,8). These gains are consistent on each of the 8 datasets as well, as shown in table 9. **Averaging over all datasets and both VLMs, we improve accuracy compared to WaffleCLIP by 1.4%, with a larger gain of 2.6% and 2.4% for the worst 20% of classes and subpopulations respectively (see table 6)**.  We stress that these latter metrics (worst class/subpopulation) more closely reflect the core problem we seek to tackle, and see the larger gains there as encouraging evidence that our method improves upon the limitation it was designed to address (i.e. underperformance on atypically appearing instances). 

Moreover, **WaffleCLIP offers no interpretability, while we offer faithful and fine-grained explanations for each inference, for free** (Sec. 5.2). Similarly, overall, the reason why WaffleCLIP is effective is not well understood. In contrast, we make principled arguments as to why our method should work, and we support these arguments with extensive empirical evidence, such as notable gains for the least performant classes and subpopulations, and precise ablations (Sec. 5.3, 5.4). 

In summary, while WaffleCLIP is surprisingly strong, our method is (i) consistently stronger, (ii) unambiguously more interpretable, and (iii) better understood with respect to why it works.

Reviewer comment (Evaluation):
(W2) The motivation of the paper might not have much practical significance and the problem addressed appears to be somewhat artificial. The underlying issue behind the paper’s motivation seems mostly related to how classes in those datasets are constructed/selected, their granularity, structure, and relations between them. Whether e.g. Big Ben is a clock, a building, or a tower, basically depends on the underlying problem that one intends to solve. Many datasets are not made to solve any practical problem but to facilitate many types of research in general. Therefore, the classes in those datasets are defined in a way that might be very broad, capture many possible sub-categories, or have a granularity that is not practically usable. Using an example from the paper, classifying an “arctic fox” as a “fox” might marginally improve the accuracy numbers but is not necessarily a better output. Whether it is depends on the underlying problem one intends to solve. Similarly, would it necessarily be better for a classifier to predict tomato as a vegetable, not a fruit? Because the biological classification of a tomato is a fruit (a type of berry).

Author response:
(W2) Respectfully, we disagree that diversity within classes is an artificial problem. Even something as simple and well defined as a ‘pear’ can actually manifest in many visually distinct ways. Moreover, this is a problem with precedent, as there are numerous existing efforts within the AI community to ensure models work beyond typical instances. For example, the field of out-of-distribution (OOD) generalization focuses on improving performance where some aspects of test inputs, such as spurious correlations [1,2,3] or domains [4], are shifted compared to the training data. Many works have also focused on algorithmic fairness towards mitigating biases, which often consist of model’s underperforming on instances that are less common / atypical (e.g. due to belonging to a demographic group underrepresented in the training data) [5]. In fact, our worst subpopulation/class metrics are inspired by the OOD community (e.g. ‘worst group accuracy’ is standard), and DollarStreet and GeoDe come from the fairness community, as they show diversity in images (resulting in harmful discrepancies in performance) is a naturally arising **real-world** problem. Notably, these datasets contain everyday objects whose labels are intuitive and unambiguous (that is, the class names are in no way designed to artificially capture many sub-categories). Many other benchmarks also exist to measure how classifiers will perform when encountering atypical data [6,7], suggesting this is a problem the scientific community deems important. 

Nonetheless, we agree that it's important to verify that our method works generally, and not just for one set of attributed datasets curated to inspect accuracy along various axes of diversity. We explore this below. 

[1] Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalization, https://arxiv.org/abs/1911.08731
[2] WILDS: A Benchmark of in-the-Wild Distribution Shifts, https://arxiv.org/abs/2012.07421
[3] Invariant Risk Minimization, https://arxiv.org/abs/1907.02893
[4] In Search of Lost Domain Generalization, https://arxiv.org/abs/2007.01434
[5] Gender Shades: Intersectional Accuracy Disparities in Commercial Gender Classification, https://proceedings.mlr.press/v81/buolamwini18a.html
[6] The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization, https://arxiv.org/abs/2006.16241
[7] ObjectNet: A large-scale bias-controlled dataset for pushing the limits of object recognition models, https://openreview.net/forum?id=SkgnRNHgIS

Reviewer comment (Evaluation):
(W2, continued) The within-class “diversity” that the paper attempts to capture seems to be mostly relevant for datasets where labels somewhat artificially capture many possible sub-categories just because they can technically be marked under the same name. But for any practical applications, the label space/names should be defined more meaningfully. Also, considering the point above (W1), given the difference in performance is only marginal between models, if that difference comes from the technical correctness on the labels (e.g. “arctic fox” classified as a “fox”) that might not necessarily mean that the model is more useful in practice. Also, see W5.

Author response:
**(W3)** The results presented in Tables A&B show that **the same set of queries we proposed can be used effectively on other datasets without tuning**. We note that we did not tune our queries to our original dataset suite (i.e. we avoided finding an optimal subset of queries or continuously adding new ones), and we most certainly did not tune them to the 9 new datasets, as these were selected after the method was fixed. Similarly, we did not tune our dataset suite to our method: we fixed our original datasets before obtaining results, and we do so again now (i.e. we did not remove any datasets where results were unfavorable to our method, like Oxford Pets). We strongly support transparency, and will release all code upon acceptance. In the same spirit, we’ll add a limitations section to discuss when our method may not be best suited (e.g. super fine-grained tasks with precise class names). 

We also concur that the LLM could be a source of error. However, unlike most components in an ML pipeline, the **LLM provides interpretable outputs, making debugging far easier**. Moreover, **our flexible consolidation scheme offers a kind of robustness to irrelevant LLM outputs**: Recall, only the similarity to a small number of subpopulations per class contribute to each logit. Thus, irrelevant (i.e. not appearing in the data) subpopulations are effectively ignored and do not affect the logit. This aspect of our work is what enables our method’s improved scaling as more attributes are incorporated: while existing methods saturate (averaging consolidation of Vanilla, DCLIP, WaffleCLIP) or deteriorate (CHiLS consolidation), our method continues to improve as more attributes are added (Section 5.3). Moreover, **LLM outputs are overwhelmingly accurate**, based on the following new small scale human validation: per trial, we randomly select a dataset, class within the dataset, and LLM query, and then manually check the fraction of responses that are appropriate. Out of 300 checked outputs, none are found to be incorrect, and only 8 are found to be uninformative. Namely, some responses to the descriptors query (actually from DCLIP) include categories as opposed to specific descriptors (e.g. ‘size and shape’ is given for ‘dog’ instead of ‘small’). Since these are merely uninformative and not incorrect, it is unlikely that our method will be damaged by them, as they’ll simply be ignored. Further, the rate of these responses is very low (2.7%). Thus, we believe the potential for erroneous LLM responses minimally affects our method. Nonetheless, we find automatic verification of LLM responses to be an interesting avenue of future research, and thank the reviewer for their comment.

Reviewer comment (Evaluation):
(W4) The qualitative analysis (Figure 5, Appendix A) seems to consist of selected samples and likely does not represent the model’s predictions across the whole dataset accurately.

Author response:
**(W5)** This is a great and very valid point. We genuinely believe diversity is everywhere, whether or not its presence is noted. We take your suggestion in stride and obtain results over 9 new datasets (detailed above), finding gains consistent with our original results. We find that **seeing our method also improve performance for finer-grained datasets is a promising indicator that intra-class diversity may arise even when we do not expect it, and consequently that our method provides meaningful gains in settings beyond those evaluated in the original submission**. If there are any more datasets you would like us to try, we would be happy to give them a shot (time permitting).

Reviewer comment (Experiments):
(W5) The method is evaluated only on datasets which (in this case explicitly) contain some forms of sub-populations, hierarchies, or significant differences across attributes. Although this is an important analysis, the question of whether the method is only usable in these kinds of datasets is open. Would the method still be usable for datasets that might, but not necessarily do contain (at least not explicitly) some form of sub-groups or diversity within classes (maybe ImageNet for example?). Or datasets where not much diversity is expected, e.g. StanfordCars dataset?

Author response:
**(W5)** This is a great and very valid point. We genuinely believe diversity is everywhere, whether or not its presence is noted. We take your suggestion in stride and obtain results over 9 new datasets (detailed above), finding gains consistent with our original results. We find that **seeing our method also improve performance for finer-grained datasets is a promising indicator that intra-class diversity may arise even when we do not expect it, and consequently that our method provides meaningful gains in settings beyond those evaluated in the original submission**. If there are any more datasets you would like us to try, we would be happy to give them a shot (time permitting).

Reviewer comment (Experiments):
(Q1) How exactly are the “worst” %x classes selected? Are they the same across all models or are they selected individually for each model? For Figures 6 (right) and 7, are they re-selected for every point (adding attributes, changing $k$ or $\lambda$) or kept the same?

Author response:
**(Q1)** The worst classes and subpopulations are chosen separately for each run, as is common practice in fairness literature (e.g. ‘worst group accuracy’). Nonetheless, very frequently, they correspond to the same classes / subpopulations.

Reviewer comment (Experiments):
(Q2) For the Breeds dataset, on which level of the hierarchy of the labels is the model trained on?

Author response:
**(Q2)** The level of ImageNet hierarchy varies for the four different Breeds datasets. Two datasets (Living17, Nonliving26) are at level 5, and the other two are at levels 3 and 4. We note that these four datasets were heavily relied upon in CHiLS; we include them to compare our method to the CHiLS baseline at its strongest.

Reviewer comment (Experiments):
(Q3) Is the image sample of a “red wolf” (in Figure 4) indeed a red wolf? Doing a quick search I am not so convinced that is what a red wolf looks like. Could it be a misclassified dog, for example? Do all other samples look similar to this one?

Author response:
**(Q3)** That image is indeed a red wolf. It is labeled as such in ImageNet, and its ears are more similar to a wolf’s than a dog. Other samples in the dataset indeed look similar, though perhaps slightly more wolf-like (often evident when a side profile of the wolf is visible). The fact that it arguably looks more like a dog than a wolf precisely illustrates a motivation to our method: some subpopulations within a class may be more similar to most instances of another class.