NLVR (Suhr et al., 2017) and NLVR2 Suhr et al. (2019) are two recently proposed benchmarks for visual reasoning with natural language. Both uses a simple binary classification task: given an image and a natural language statement, predict if the statement is true or false with regard to the image.
The images in NLVR are synthetically generated, and the language was collected through a crowdsourcing process. The image generation and data collection process was designed to generate data robust to single-modality biases. Each statement is paired with multiple images, some pairings have the label true, while others are false. The images were generated so that for each image used in an example with the label true, there is an image with exactly the same set of objects but arranged differently in an example with the same sentence, but with the label false. Figure 0(a) shows four examples from NLVR, all using the same statement.
NLVR2 (Suhr et al., 2019) uses two paired real images and a natural language statement for a similar classification setup, where the goal is to decide if the statement is true or false with the regard to the pair of images. The NLVR2 data collection process included creating a new set of web images and a compare and contrast sentence-writing task, which enabled collecting semantically diverse natural language.
2 Overview of the NLVR2 Data Collection Process
The data collection process is split into: (a) collecting sets of image pairs, (b) setntence writing, and (c) validation. In the first step, sets of eight related images are collected and randomly split into four pairs. Each set of four pairs is given to a worker. They were asked to select two pairs, and write a sentence that is true for the selected pairs and false for the other pairs. Finally, workers are presented with an image pair and a statement to validate the label assigned by the sentence writer. This leads to pruning a small part of the data, so not all statements appear exactly four times (i.e., with the four orignal image pairs). Figure 0(b) shows an example statement from NLVR2 paired with four image pairs, two with a label of true and two with false.111License information for images in Figure 0(b), from top left to bottom right: Charles Rondeau (CC0), Hagerty Ryan, USFWS (CC0), Andale (CC0), Charles Rondeau (CC0), George Hodan (CC0), Maksym Pyrizhok (PDP), Peter Griffin (CC0), Petr Kratochvil (CC0).
During the annotation process, pairs of images are often annotated multiple times, and appear in the data with different sentences. The majority of such cases is because each set of pairs was annotated twice to obtain more natural language data with the available of sets of image pairs. However, a small number of pairs were annotated even more times because they appeared in multiple sets (i.e., set of four pairs). This happened by chance, and relatively rarely. Figure 2 shows the distribution of times unique image pairs appear in the training set.
3 Visual Bias in NLVR2
Each sentence in NLVR2 is written to be true for two pairs of images and false for two pairs. This way, each sentence appears with multiple image pairs with different labels (unless some were pruned in validation). This provides robustness against language biases (i.e., some sentences are more likely to be true or false depending on the language only). However, it is possible that some image pairs are more likely to be picked so that the sentence written for them has the label true and some are more likely to elicit the label false based on the visual content alone. This can lead to models that use this bias to solve the task while ignoring the natural language statement. This may happen because it was left to the workers to pick which pairs to label as true and false. This choice was left to the workers to make the task easier. Suhr et al. (2019) note that forcing the label assignment creates a much harder task of what is already a challenging annotation task. We analyze this potential for bias using pairs that appear in the data multiple times.
Consider pairs that occur twice in the data. If labels are assigned randomly by the sentence writers, we would expect about half of these pairs to have exactly the same label in both instances (true/true or false/false). In total, there are 33,866 pairs in the training set that occur twice, so we expect 16,933 pairs to have the same label in both instances. However, the observed frequency of pairs with the same label is higher, at 21,267. The pairs that occur twice likely appeared along with the same images during sentence-writing. Workers were prompted to write a sentence true about the selected pairs and false about the unselected pairs, and therefore are likely to prefer to select the two pairs that are more similar to each other within the set of four pairs. This could explain a bias towards a certain label for that pair. Therefore, it is likely that the bias exists only when considering each image pair in the context of the other pairs it appeared with in sentence-writing. When taken out of this context, as in the NLVR2 task, this bias may become irrelelvant.
Pairs that occur more than twice in the data are more interesting. Consider an event that is less likely: pairs that occur three times with the same label. The probability for a pair to have the same label (true/true/true or false/false/false) is 0.25. There are 345 pairs that occur three times, so we would expect around 43 to have the same label in all instances. However, we observe 128 have the same label. We can generalize this analysis to all observed pair frequencies in the training data. Table 1 shows the expected and observed counts of unique pairs appearing with the same label across instances for varying pair frequencies.
|Pair Freq.||# Pairs||Expected # Same||Expected % Same||Obs. # Same||Obs. % Same|
We observe identical labeling at a proportion (Obs. % Same) much more than expected if assuming labeling events are independent (Expected % Same). Figure 3 shows several examples of pairs that appear many times with the same label, along with the label they were given and the sentences they are paired with.
If the bias is real, we can try to compute the performance of a model that perfectly learns the bias but ignores the language. This is a worst-case scenario, and assumes we can perfectly learn the bias on the evaluation set. We assume that for all image pairs in the evaluation set, the model outputs the majority label for this pair for all examples including this pair. For image pairs that appear once, the model outputs the gold label. If a pair appears twice with the label true, the model outputs true for both examples. If a pair appears in three examples with true, false, and true, the model outputs true, and gets two out of the three right. We break ties with true, which is the majority class in the data. We compute this on the development set and achieve 83.53% accuracy.
4 New Evaluation Protocol
To analyze the extent to which proposed models are taking advantage of any visual bias, we can isolate the part of the evaluation set that is clearly not susceptible to visual bias and test on it. If models perform on it as well as they do on the general evaluation set, they are not taking advantage of the bias. We identify all image pairs that appear in the evaluation data multiple times but with different labels (balanced labels). Because the evaluation sets are much smaller, the highest frequency of pairs is two. We create new evaluation sets where each image pair appears twice, once with the label true and once with false. The new sets are smaller, but still large enough to evaluate. We only report accuracy on this subset of the data because consistency (Goldman et al., 2018) changes due to the example selection process and we want to avoid confusion with the consistency measures of the existing splits. Similarly, we evaluate on the subset of the data consisting of pairs that appear more than once with the same label (unbalanced labels). From the development set, which contains 6,982 examples in total, we obtain a balanced subset of 2,300 examples and an unbalanced subset of 3,562 examples.
We analyze existing state-of-the-art models on NLVR2. We evaluate VisualBERT (Li et al., 2019) and LXMERT (Tan and Bansal, 2019) using the subset of the evaluation data and show that they largely maintain their reported performance, although there is a small drop in performance on the balanced set and a small increase in performance on the unbalanced set. Table 2 shows the results of both systems on the balanced and unbalanced subsets of all three evaluation sets.
|Split||System||Original Acc.||Balanced Acc.||Unbalanced Acc.|
We study the potential for visual bias in NLVR2, and show that allowing the workers to assign labels to image pairs may have introduced some level of visual bias. We quantify this potential bias, and calculate the best possible performance for a model relying only on this bias. We also create new evaluation sets using subset of the original evaluation data. These new sets are robust to bias, and provide an avenue to test if models are taking advantage of latent bias. Our evaluation of existing SOTA models using the new evaluation sets shows that largely they do not take advantage of latent visual bias and confirm their performance gains.
The key takeaway is the addition of the new evaluation sets for the NLVR2 evaluation. We add these evaluation sets to the NLVR2 data release. We also recommend evaluating existing models on the original NLVR corpus, which includes synthetic images, and was constructed to be robust to both visual and linguistic biases. However, this may be challenging for models relying on pre-training using natural images.
We thank Hao Tan and Mark Yatskar for feedback on this note.
- Weakly supervised semantic parsing with abstract examples. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, pp. 1809–1819. External Links: Cited by: §4.
- VisualBERT: a simple and performant baseline for vision and language. CoRR abs/1908.03557. Cited by: NLVR2 Visual Bias Analysis, Table 2, §4.
- A corpus of natural language for visual reasoning. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, pp. 217–223. External Links: Cited by: 0(a), §1.
- A corpus for reasoning about natural language grounded in photographs. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, pp. 6418–6428. External Links: Cited by: NLVR2 Visual Bias Analysis, 0(b), §1, §1, §3.
LXMERT: learning cross-modality encoder representations from transformers.
Proceedings of the Conference on Empirical Methods in Natural Language Processing, Cited by: NLVR2 Visual Bias Analysis, Table 2, §4.