---
title: "Automatic Generation of Contrast Sets from Scene Graphs:"
description: "Scene graphs turn small edits to GQA questions into tests of visual reasoning, exposing errors that ordinary validation accuracy can miss."
canonical: "https://research.elamur.ai/free/en/papers/bitton-2021-automatic-generation-contrast-sets-scene/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bitton-2021-automatic-generation-contrast-sets-scene/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Automatic Generation of Contrast Sets from Scene Graphs: Probing the Compositional Consistency of GQA

# Automatic Generation of Contrast Sets from Scene Graphs: Probing the Compositional Consistency of GQA

Paper · 2021 · Yonatan Bitton, Gabriel Stanovsky, Roy Schwartz et al.

**Authors:** [Yonatan Bitton](https://md.research.elamur.ai/free/en/authors/yonatan-bitton/), [Gabriel Stanovsky](https://md.research.elamur.ai/free/en/authors/gabriel-stanovsky/), [Roy Schwartz](https://md.research.elamur.ai/free/en/authors/roy-schwartz/) and [Michael Elhadad](https://md.research.elamur.ai/free/en/authors/michael-elhadad/) · **Year:** 2021 · **Venue:** Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **23** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/bitton-2021-automatic-generation-contrast-sets-scene/cited-by/) · Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.naacl-main.9/)
- [PDF](https://aclanthology.org/2021.naacl-main.9.pdf)
- [DOI 10.18653/v1/2021.naacl-main.9](https://doi.org/10.18653/v1/2021.naacl-main.9)

## Summary

A system can answer a question about a photograph correctly and still get a closely related question about the same photograph wrong. Suppose it correctly says that a fence is near a puddle. If the question mentions a wall instead, the answer should change when there is no wall near the puddle. The photograph stays the same, so the edited question tests whether the system responds to the particular object named in the question. The authors use such edits to investigate what ordinary validation accuracy can miss in visual [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/).

Their method uses GQA, a dataset whose images come with scene graphs. These graphs list objects and record properties and relationships that can be checked when a question changes. The authors identify recurring question forms, choose an object or relationship to replace, and consult the graph to determine the new answer. The edit must change that answer while preserving the conditions that make the question answerable. A change to the object in a color question, for example, requires an identifiable replacement object with a recorded color. The procedure produces contrast sets, which group an original question with edited questions about the same scene. A separate human check found agreement with the recorded answers on 76.6% of sampled original questions and 72.3% of their edited counterparts. The authors traced most of that gap to discrepancies between the graphs and the photographs.

The original GQA training data yielded substantially higher accuracy on the original validation set than on the generated contrasts. MAC went from 64.9% on the original questions to 51.5% on the contrasts, and LXMERT went from 83.9% to 67.2%, with up to 5 edits per question. The authors also asked whether LXMERT could answer an original question and every edit in its group correctly. As the maximum rose from 1 to 5 edits, this measure fell from 63.4% to 46.1%, even though accuracy on individual edited questions stayed close across the tested settings.

Training with automatically edited questions improved contrast accuracy for both systems. MAC reached 68.4% and LXMERT reached 77.2% on the generated validation contrasts, while their original validation accuracies stayed close to their baselines. A comparison that held the amount of training data fixed gave similar results. The findings show that GQA’s balanced construction leaves room for failures on nearby questions and that training on these variations can help. The scope of that evidence follows the generator’s coverage and the reliability of the scene graphs used to assign answers.

## Deep dive: Automatic Generation of Contrast Sets from Scene Graphs: Probing the Compositional Consistency of GQA

Scene graphs turn small edits to GQA questions into tests of visual reasoning, exposing errors that ordinary validation accuracy can miss. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What a correct answer can leave unresolved

An image and a question together specify what a visual answering system is supposed to do. The image supplies the evidence, and the question identifies a fact to recover from it. If asked whether a particular object is near another, the system needs to identify the named objects and judge the relationship between them. A correct answer is consistent with that process, but it can arise whenever a shortcut and the image point toward the same response. A question about a familiar arrangement of objects might have an answer that is easy to guess from the wording. The benchmark records a success either way.

The paper connects this problem to how benchmarks usually measure generalization. Training and test examples are often drawn from similar distributions. If recurring words, styles of annotation, or omissions in a dataset help predict answers during training, they can remain useful during evaluation. The test then measures performance on fresh items that inherit many of the same regularities. The earlier work discussed by the authors found that performance could deteriorate when examples were constructed to weaken those regularities. The concern is that a high test score can leave open which information a system needed to use to earn it. [Evaluation & benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/)

GQA is a particularly informative place to ask this question because its design already addresses some of those concerns. Its questions are intended to exercise combinations of visual skills. The dataset uses scene graphs and functional programs, which represent the operations a question calls for, to help balance the data and reduce spurious associations. A question about where an object lies relative to another can require object identification, grounding the names in the image, and checking direction. Including such questions makes those skills relevant to the task. An aggregate result still leaves open whether a system applies the same skills reliably as the referenced objects or relations change.

Balance and contrast sets intervene at different points. Balancing questions and answers changes the collection as a whole. A contrast set places the original question and a carefully edited relative on the same image, with a known change in the correct answer. A system can therefore encounter both sides of a distinction that was easy to overlook in the ordinary evaluation. The two questions need not be equally frequent in the dataset or evoke equally familiar scenes. Their value as a comparison comes from the fact that a specific change in what is asked has a verifiable consequence.

#### Why the edit changes the answer

The paper builds on earlier work that constructed contrasts by making small changes to test inputs that required corresponding label changes. The point is to probe behavior near an existing test example. A small revision can expose a failure that would be harder to interpret if the new example also introduced a different scene, a different question structure, and new vocabulary throughout. If a left–right question keeps the same objects and changes only the direction, the difference between the two questions is easy to identify. The response should follow the direction named in each question.

This design also distinguishes contrasts from a change in wording that preserves meaning. Rephrasing a question can test whether the system gives a stable answer when the underlying request is the same. Here the generator requires an edit that changes the underlying request enough to change the answer. A system that simply repeats the original prediction after every edit will fail on edited questions whenever it was right on the originals. It can also fail while changing its answers, particularly on questions such as color identification, where several different responses are possible. The desired behavior is sensitivity to the thing that changed, together with continued attention to the image and the rest of the question.

The earlier contrast-set studies discussed by the authors relied mainly on people to make and label edits. The paper notes exceptions involving automatic construction for text datasets. Visual questions present a specific obstacle to extending that approach. Replacing a noun is easy as an operation on text, but assigning the new answer requires knowing what is in the picture. Someone checking an edited spatial question may have to locate objects, establish which ones the words refer to, and decide whether the claimed relationship holds. An edit to a color question can fail altogether if the substitute has no visible referent or if its color is unclear.

The authors’ proposal is to use information GQA already records to carry out much of that checking. A scene graph represents parts of the picture in a form a program can query. It can supply evidence for choosing a replacement, deciding whether the new question is answerable, and assigning a label different from the original one. The same resource that makes generation practical also sets its evidential limits. When the annotations omit an object or describe a spatial relation incorrectly, the program can produce an answer that is consistent with the graph and inconsistent with the image. How well the graph serves as a substitute for direct visual judgment thus becomes part of the evaluation.

#### What the test isolates

Keeping the image fixed gives the study a particular focus within [vision and language](https://md.research.elamur.ai/free/en/topics/multimodal/). The experiments ask how answers change when a new combination of familiar question components is applied to the same visual evidence. They can test, for example, whether identifying the correct reference object is enough to support a reliable judgment when the target object changes. They can also hold both objects fixed and vary the relationship between them. Those are distinct demands even when the revised questions look nearly identical on the surface.

That focus helps explain the paper’s use of compositional consistency. A question can combine operations such as identifying an object, selecting a reference, and assessing a relation. To handle a group of contrasts consistently, a system must get the answers right as the relevant components vary. The group makes the test stricter than asking only whether the original question was answered correctly. It also keeps the conclusion tied to observed behavior. The same output pattern can have different internal causes, so the study uses the contrasts to locate difficulties that deserve explanation rather than to infer a unique mechanism from each failure.

### The method, step by step

#### What the scene graph contributes

Start with an image, an existing GQA question, and its recorded answer. The image’s scene graph gives the generator something it can inspect directly. Objects have bounding boxes that locate them in the image. They can carry attributes, such as the material of a fence, and participate in relationships with other objects. A puddle can be represented as near a fence or to one side of an animal. This makes it possible to check a candidate change using object labels, attributes, and connections recorded for the same image.

The authors use that information to edit questions while leaving the image alone. A change can target an object, a relationship, or an attribute. The unit they aim to change is a single component of the question’s meaning. Its surface wording can change in several places if required by grammar. Replacing a singular noun with a plural one can affect the article and verb as well as the noun. Those repairs preserve the intended edit by making the revised question read normally without adding a separate change in what is asked.

The procedure has two judgments to make about a candidate. It must find out whether the edited question has an answer under the scene graph and whether that answer differs from the original. Passing only one of those checks is insufficient. A replacement that preserves the answer provides no label-changing contrast. A change that makes a required object impossible to identify leaves the question without the kind of answer its wording requests. The generator retains an example when the graph supports a usable question with the required answer change.

Generating a contrast question from a GQA scene graph The steps in order.

#### Find questions the rules can handle

The first step is to identify which GQA questions can be treated by the generator. The authors select recurring forms that let them locate the meaningful parts of a question and associate each editable position with a rule. They implement the patterns as regular expressions, which match recognizable sequences of words and capture the parts that vary. In a proximity question, one variable can represent the object whose presence nearby is being checked, and another can represent the object that serves as the reference point.

They identify six templates. A side question asks where an identified object is, and a color question asks for an identified object’s color. A disjunction asks whether either of the named alternatives is visible. A proximity question relates a target to a reference object. The remaining entries use the same general relational wording but correspond to different edits. One changes the relationship between the objects. The other changes an object while keeping the relationship in the question. The distinction matters for evaluation because the same sentence form can provide tests of different behavior.

The templates also show how the selection works at the level of skills. A side question begins by requiring the system to identify an object, then asks for a direction or position. A color question requires identifying an object and associating a visual property with it. A proximity question asks for a judgment that depends on the locations of both a target and a reference. A disjunction can be answered affirmatively if one of its alternatives is present. When the generator edits any of these questions, it must consider how the edited part interacts with the parts that remain.

According to the paper, the regular expressions match 29K validation questions and 80K training questions, accounting for about 22% and 8% of the respective splits. Matching supplies the questions the authors can attempt to edit. Producing a contrast requires further checks, and a matched question can yield several accepted alternatives. The paper varies how many it keeps per original question. The distinction between recognizing a template and producing admissible edits is important when reading the dataset counts.

#### Match the question’s words to graph objects

A pattern can identify the text span naming an object, but that span need not reproduce a label in the graph exactly. A question may use a plural while the graph labels individual objects with a singular noun. It may use a synonym, or name a category at a different level of specificity. The generator therefore uses exact matching alongside rules for number and lexical relationships. The paper illustrates the issue with plural and singular names for dogs, with a broad label such as animal applied to a dog, and with different words for a motorcycle.

Grounding is the step that connects such expressions to the objects they refer to. In a proximity question, the generator needs that connection before it can look up relevant neighbors. An error at this stage can change which part of the scene the rule checks. If a name is interpreted too narrowly, real matches may be missed. If it is interpreted too broadly, the rule can count an unrelated object as satisfying the request. The paper’s matching rules help bridge the difference between the freely worded question and the vocabulary of the graph, with the exact procedures given in the authors’ code.

Changes in category breadth require care because the implications run in particular directions. A visible cat is evidence that an animal is present. A visible animal of an unspecified kind leaves the cat question unresolved. Likewise, an image with no animal contains no cat, whereas an image with no cat can contain some other animal. This matters both for matching references and for choosing replacements. Ordinary word similarity can help the program propose a candidate. The new answer still has to follow from the object information and the meaning of the revised question. [Lexical semantics](https://md.research.elamur.ai/free/en/concepts/lexical-semantics/)

#### Propose an edit and test its effect

The authors use different cues to propose suitable substitutions. For a form with a single object, the substitute can be textually similar to the original noun. The side-question example substitutes dishes for a dishwasher. For forms that involve a pair of objects, the paper describes drawing on associations from other GQA scene graphs to find a plausible candidate for the position being changed. That association supplies a reason to try the replacement. Whether the answer changes depends on the graph of the particular image under consideration.

This separation between proposal and verification is central to the method. Something that commonly occurs near a given type of object is a plausible target in a question about proximity, even when it is absent from the particular image. Something that resembles the original noun can give a plausible revision of a color or side question, but resemblance alone says nothing about the new object’s position or color. The candidate can be discarded if the graph fails to support a required object or if the computed answer stays the same. Sampling is useful for finding alternatives, while verification assigns the answer to each accepted one.

The fence and puddle example puts those checks in concrete terms. The original question asks about the presence of a fence near a puddle and has an affirmative answer. The generator recognizes the proximity pattern and separates the target, the fence, from the reference, the puddle. It tries a wall in the target position. In the paper’s worked example, the wall is absent from the graph’s object inventory, so the graph supports a negative answer about a wall near the puddle. The edited question still has a puddle to refer to. The answer change comes from the new target.

The same logic explains why an absent object can be legitimate in one position and disqualifying in another. Asking whether a wall is near an identified puddle can have a meaningful negative answer when there is no wall. A question that asks for the color of a particular wall presupposes a wall whose color can be determined. A definite reference in a spatial question can impose a similar requirement. The generator checks the conditions appropriate to the question form. Turning every missing annotation into a negative response would create invalid questions, especially where the wording presupposes that a named object exists.

#### Use a rule specific to the question form

For side and color questions, the goal is to obtain a different value for the property being requested. If a proposed substitute is recorded on the same side, it supplies no useful side contrast. If the new object has the same color, the new color question has the old answer. The examples include a side edit from a dishwasher to dishes and a color edit from a cat to a jacket. The relevance of these substitutions depends on the particular scene, even if the question forms could be applied to many images.

Proximity edits require a check of what stands in the specified relationship to the reference. In another example, the reference is a group of players and the original nearby object is a fence. Trying trees in place of the fence calls for finding the graph representation of the players and checking the relevant neighbors. A tree appearing elsewhere in the scene would be a different matter from a tree near the players. This is why the check can use the graph’s edges as well as the inventory of objects.

A relational question can be altered along either of the dimensions the templates distinguish. In one case the objects stay in place in the wording, and the direction changes. The paper illustrates this with a boy and a man whose left–right relationship is queried in opposite directions. In the other case, the relation remains fixed in the wording and a different subject is introduced, as in the example that substitutes a zebra for a boy. Either edit can require a new answer, but the evidence that determines it is different. One requires checking the relation for the same object pair. The other requires checking which relation holds for a new pair.

Missing relation information can prevent generation. An appendix example shows a candidate involving a pillow and a cat for which the necessary relation is unavailable, so the authors do not generate that edit. This helps explain the distinction between the case where an absent target supports a negative answer and the case where missing information leaves a particular relational judgment unresolved. The pattern’s meaning governs what counts as enough evidence for a label.

The disjunction makes the dependency between question components especially clear. Suppose the original wording asks about laptops or cameras and a candidate replaces laptops with headphones. The unchanged alternative can still determine the answer. If cameras are present, the edited disjunction can remain true irrespective of the headphones. A replacement therefore has to be judged in the context of the whole question. The requirement that the final label change rules out edits whose effect is canceled by the component that stays fixed.

#### Repair the sentence and keep accepted variants

After substitution, the generator applies linguistic rules to keep the question fluent. Number affects agreement and whether an indefinite article is needed. A singular count noun may need an article, and its initial sound affects which form fits. A plural expression can require a different verb. Mass nouns such as water have their own article behavior. These adjustments can change the appearance of the sentence beyond the replacement word while leaving the substantive edit focused on the intended component.

The rules also preserve distinctions that matter to interpretation. Turning a definite expression into an indefinite one can replace a question about a particular assumed object with a question about whether any object of that kind exists. The authors therefore retain the original distinction between definite and indefinite articles. They also take account of the implications of more general or more specific words. These safeguards matter for evaluating the answering systems. If an edit inadvertently changes both the target object and what the question presupposes about it, the response becomes harder to interpret.

The paper screens generated samples against existing GQA questions to avoid retaining questions already present in the dataset. For an original question, the generator can try more than one replacement and keep several successful edits. The experiments use settings that allow up to 1, 3, or 5. The cap specifies how many can be retained. The graph and the available candidates determine how many can actually be found. Each retained edit is associated with the original question, allowing the paper to score both individual answers and performance across groups.

The authors release the generated contrast sets and the code for constructing them. They apply generation separately to validation and training data. Validation variants serve as the challenge. Training variants provide extra examples that use the same kind of controlled changes. This gives the study a way to ask two different questions with the same procedure. It can measure how well systems trained on ordinary GQA handle the edits, then check whether training with such edits improves performance on the corresponding validation task.

#### Define success across an entire contrast set

Ordinary accuracy scores a prediction against the correct answer for an individual question. Contrast consistency extends the correctness test to the group built around an original question. A group counts as successful only if the original answer and every edited answer are correct. The paper gives the definition in words. Written as a fraction to be reported as a percentage, it is:

```
C = |{S ∈ 𝒞 : ∀ e ∈ S, ŷ(e) = y(e)}| / |𝒞|
```

Here `C` is contrast consistency, and `𝒞` is the collection of contrast sets being evaluated. `S` is one set in that collection, and `e` is one question instance in `S`, including the original when that is the instance under consideration. The symbol `∈` means membership, and `∀` means that the condition applies to every instance. `ŷ(e)` is the predicted answer for `e`, and `y(e)` is its recorded answer. The inner `=` requires those answers to match. The braces enclose the qualifying sets, the colon introduces the condition for inclusion, and the vertical bars count the members. The slash divides the number of successful sets by the total number of sets. The outer `=` defines `C`.

The paper opens with an illustration of a four-member group in which only two of the four predictions are correct. That group contributes some correct individual predictions and fails the group-level test. Consistency can therefore reveal gaps that item accuracy averages over. It also becomes a more demanding measure as the group grows, since every extra question introduces another answer that has to be correct. Interpreting it calls for keeping the size and construction of the groups in view.

### Experiments and results

#### The validation and training data

The authors evaluate on the original GQA validation questions and on contrasts generated from validation examples. They use MAC and LXMERT, which they describe as the strongest publicly implemented entries on the GQA leaderboard at the time of submission. For both systems, the baseline uses ordinary GQA training data. The augmented condition trains on GQA with generated contrast questions included. The tests thus compare original and edited validation questions under each training condition.

There are several counts to keep distinct. The appendix lists 10,696 images and 132,062 question–answer pairs for the original validation data. In its generation statistics, the settings capped at 1, 3, and 5 yield 12,962, 26,189, and 32,802 augmented question–answer pairs, respectively, with 6,166 augmented images reported at each cap. These figures describe the appendix’s generation totals. The performance tables give different sizes for the contrast evaluations at the same caps. The generation and performance counts should each be read with their own table, since the paper leaves their relationship unclear.

For training, the main experimental description gives a combined total of 1,023,607 samples after adding contrasts and describes the original training pool as 943K. The appendix separately reports 943,000 original training question–answer pairs and 89,936 augmented pairs in its generation statistics. Those figures characterize different presentations of training data in the paper. The main experimental total is the one the authors give for the retraining comparison. The appendix figures describe the generator’s reported output and should not be used to reconstruct the actual training pool.

The training setup also matters for interpreting the baseline. The appendix explains that LXMERT normally has a pretraining stage followed by [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). Its usual pretraining includes GQA training and validation data. To avoid inflating validation results, the authors repeat pretraining without GQA, then fine-tune on the designated training data. They use the public implementations for both systems and adjust the configurations to keep validation data out of training. This makes the paper’s own baseline the appropriate comparison for the augmented condition.

#### How much accuracy changes after an edit

With up to 5 validation edits per original question, MAC trained on ordinary GQA obtains 64.9% accuracy on the original validation set and 51.5% on the generated contrasts. LXMERT under baseline training obtains 83.9% on the original set and 67.2% on the contrasts. The paper describes this overall pattern as a 13–17% reduction in performance. The endpoint accuracies show the comparison directly and identify the condition behind each score.

The stronger baseline remains stronger on both sets by item accuracy. LXMERT’s high accuracy on the original validation questions still leaves substantial room for errors when the referent or relation changes. MAC starts lower and also loses accuracy on the edits. The fact that both systems respond this way supports the paper’s claim that compositional questions and label balancing in the original dataset leave some nearby cases insufficiently tested. It is a finding about the specific variants the generator creates and the systems evaluated on them.

Training on contrasts improves each system’s result on the corresponding validation challenge. MAC’s augmented-training accuracy reaches 68.4% on the contrast set and 64.4% on the original validation set. LXMERT reaches 77.2% on the contrasts and 82.6% on the original set. Both original validation scores are numerically lower than their respective baselines, although the changes there are small relative to the improvements on the contrasts. For MAC, the augmented-training score on contrast questions is higher than its score on original validation questions.

MAC and LXMERT accuracy on GQA validation contrasts by training data Training with contrast questions improves contrast accuracy for both systems.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| MAC with original training | 51.5 |
| MAC with contrast-augmented training | 68.4 |
| LXMERT with original training | 67.2 |
| LXMERT with contrast-augmented training (this paper) | 77.2 |

These results show what happens when examples constructed by the same method are used for both training and evaluation on their respective GQA splits. The improvement is compatible with the idea that the added examples provide informative distinctions. A system can see original questions together with nearby cases whose answers require it to respond differently. The scores establish better performance on the resulting challenges. The experiment does not identify exactly which cues the systems learned from the extra examples.

#### Check the generated answers with people

The automatic procedure assigns answers from graphs, so the authors also test how well those labels agree with judgments made from images. They sample 553 images and include an original and an edited question for each, for a total of 1,106 judged instances. The paper describes the sample as ≈4% of the validation contrast pairs. Mechanical Turk workers answer the image–question items independently and are unaware of whether an item comes from original GQA or from the contrast generator. This lets the authors compare agreement with the existing labels under the same annotation procedure.

The workers match the recorded answers on 76.6% of the original questions and 72.3% of the edited ones. The paper reports inter-annotator agreement of κ = 0.679, where κ denotes a chance-adjusted agreement statistic. Agreement among workers and agreement with the recorded answer address different questions. Workers can agree on what is visible even when the scene graph leads to a different label. Conversely, a graph can record a definite answer for a question that people interpret in more than one way.

The original-question score is particularly important for reading the comparison. The paper cites human accuracy of around 90% from the original GQA study. The workers in this experiment answered a narrower set of questions selected to match the generator’s templates, and the authors suggest that this subset may contain more ambiguous items than an average GQA sample. Their own original-question result supplies the relevant comparison for the generated questions. Judging the edits against the higher figure from the separate GQA study would mix different sets of questions and different evaluation conditions.

The authors attribute most of the observed human gap between originals and contrasts to disagreements between the images and scene graphs. They describe examples involving objects that appear in the image but are absent from the graph, and objects recorded in the graph that workers cannot find in the image. That analysis supports using the graph as a source of labels while clarifying where its judgments can fail. The human accuracy figures apply to the sampled original and edited questions. The system accuracy figures describe the larger validation comparisons, so the experiments give complementary evidence about answer quality and system behavior.

#### Ask whether complete groups are answered correctly

The authors also score baseline LXMERT while varying the maximum number of edits retained for a question. The performance table reports contrast evaluation sizes of 11,263, 23,236, and 28,968 for caps of 1, 3, and 5, respectively. The corresponding accuracy on edited items is 66%, 67%, and 67%. At the level of individual questions, the score therefore stays close as the generator admits more replacements.

The group measure tells a different story. Contrast consistency is 63.4% at the cap of 1, 51.1% at the cap of 3, and 46.1% at the cap of 5. Here a correct edited answer is insufficient if the original or another edit in the same group is wrong. The lower consistency shows that a substantial share of groups contain something the system gets wrong as the number of tested alternatives increases. A reader can encounter nearly identical item accuracy across the settings while learning that the system is less frequently correct throughout a group.

Baseline LXMERT contrast consistency on GQA validation by edit cap Fewer groups are answered correctly throughout as the edit cap rises.

**The numbers**

| System or setting | contrast consistency % |
| --- | --- |
| Up to 1 edit per question (this paper) | 63.4 |
| Up to 3 edits per question | 51.1 |
| Up to 5 edits per question | 46.1 |

The authors take the stable item accuracy as evidence that the main contrast result is insensitive to the particular number of replacements retained within the tested range. The consistency measure answers a stricter question whose conditions change with the cap. Its decline shows the practical difference between expecting a correct response to a sampled contrast and expecting correct responses across several contrasts about the same scene. It does not establish that each additional replacement is intrinsically harder than the earlier ones.

### What the ablations show

#### Replace training examples while holding the total fixed

Adding generated questions changes the information available in training and increases the size of the training set. In the main comparison, either change could contribute to improved validation contrast accuracy. The authors address the size explanation by repeating the training experiment while removing as many original examples as they add in contrasts. The resulting training set is the same size as the original one, but part of the data now consists of generated questions.

The paper reports very similar results for this comparison. That finding supports the view that the content of the new training examples matters. If the improvement depended on simply having a larger pool, it would be difficult to explain its persistence when generated examples replace existing ones. The control is useful precisely because it changes something the main experiment leaves entangled with the augmentation. The paper does not give separate scores for this repeat, so the evidence supports the authors’ qualitative account of the outcome.

The control also has a narrower scope than a comparison among possible kinds of augmentation. Generated questions differ from original ones because of the way their wording, answers, object choices, and relationships are constructed. Holding the count fixed does not distinguish which of those differences supplies the benefit. The results show that the training mix helps in this setup. They leave open how much of the improvement could be obtained with some other way of generating related questions.

#### Compare question types and the part that changes

Reporting scores by template helps identify which distinctions are hidden by an overall average. In the template breakdown with up to 5 edits, the original-trained LXMERT scores 94% on original side questions and 81% on the edited side questions. Its color scores are 69% on originals and 62% on edits. The corresponding MAC results are 68% and 57% for side questions, and 49% and 49% for color questions. These rounded scores belong to the template comparison in the paper rather than the more precise aggregate comparison of training conditions.

Questions about pairs of objects frequently show a wider separation. On the proximity template, MAC scores 85% on originals and 66% on edits, while LXMERT scores 98% and 79%. On the disjunction template, MAC goes from 88% to 53% and LXMERT from 95% to 65%. A small surface change can still demand a substantial revision of the answer. In a disjunction, two alternatives can contribute evidence. In a proximity question, the relevant objects and their locations determine whether the proposition holds.

The two relational entries illustrate why it is helpful to record which part was edited. For the entry that changes the relation, the rounded original and contrast accuracies are 85% and 44% for MAC, and 96% and 69% for LXMERT. For the entry that changes an object, they are 71% and 38% for MAC, and 93% and 55% for LXMERT. The shared question form can conceal these different demands if results are grouped only by wording. Altering a relation asks whether the system distinguishes relational meanings for a fixed pair. Altering an object asks whether it applies the given relation to the newly named pair.

The authors emphasize that templates mentioning two objects tend to show larger declines than those mentioning a single object. The breakdown supports that general description, but the question types also differ in their answers and in what the generator changes. They are not controlled examples in which the number of object references is the only varying feature. The comparison identifies where the challenge is concentrated. It does not isolate the presence of another object as a causal explanation for all of the additional errors.

Color questions show the smallest decline in the reported breakdown. The authors suggest that the comparatively low starting performance, together with the multiple possible answers and subjectivity of color judgments, may help explain the pattern. MAC’s equal rounded scores on original and edited color questions should be read alongside the absolute accuracy of 49% in each condition. Stability under the edit shows little change on that measure. It provides a different piece of information from whether the system can reliably recover the correct color in the first place.

#### Increase the number of edits that each question can receive

Varying the cap tests whether the contrast results depend strongly on retaining a particular number of successful substitutions. The appendix’s breakdown shows where stability in the aggregate conceals movement within a template. For LXMERT, edited proximity accuracy is 84% at the cap of 1 and 79% at the cap of 5. Its edited side accuracy is 79% and 81% at those caps, and its edited color accuracy is 62% at both. For MAC, edited proximity accuracy is 72% at the cap of 1 and 66% at the cap of 5, while edited disjunction accuracy is 53% at both. These comparisons concern accuracy on generated validation questions for each type at the given cap.

The settings admit different numbers of edits across question forms. A template with many graph-supported replacements can contribute more examples as the cap rises. A template with few usable replacements contributes less additional material. This is another reason to read the aggregate accuracy alongside template scores. An apparently steady result at the dataset level can reflect a combination of changes in performance within particular types and changes in how frequently those types contribute questions.

The contrast consistency comparison gives a different interpretation of the same cap manipulation. Asking for correct answers throughout a larger collection is a stricter criterion even if accuracy per item is similar. The result establishes that stable item accuracy does not guarantee reliable answers across a group. A rate of success on whole groups does not by itself tell whether the failure came from the original question, a particular kind of edit, or the way failures accumulate when more edits are included. The paper uses the measure as an additional account of robustness rather than as a replacement for the per-question breakdown.

#### Compare human judgments with the graph-based labels

The human study also serves as a check on a possible explanation for the results. If edits broadly stopped being answerable, a system’s accuracy could fall because the generated questions had become invalid. The paper finds that the sampled edits are somewhat harder for workers to match to the recorded labels than the originals. It then inspects errors and attributes most of the difference to graph annotations that disagree with the photograph.

That analysis is informative about where the generation procedure fails. A rule can correctly infer that an annotated graph lacks a given object, yet that inference is a poor basis for a label if the object is clearly visible. In the opposite case, a rule can validate an edit using a graph object that workers cannot identify in the image. Such examples make the graph-faithfulness problem concrete. They also show why grammatical plausibility and image-level correctness must be evaluated separately. A completely fluent question can be paired with a bad answer if its evidence is drawn from an incomplete annotation.

The validation provides an independent comparison for generated and original questions under the same human procedure. Because original questions also show disagreement with their labels, the absolute accuracy of the edited questions cannot be attributed entirely to the edit rules. The error inspection supports the narrower conclusion that annotation quality explains much of the difference the workers encounter. It leaves the full challenge set with automatically assigned labels and a sampled estimate of how they align with human answers.

### Limitations

#### Limits the authors identify

The paper’s method relies on a sufficiently rich representation of an image. Its rules need an inventory of objects and, depending on the question, information about attributes or relationships. The conclusion proposes extending the approach to other visual answering datasets, with annotated scene graphs as the enabling condition. The study demonstrates the method on GQA. A collection of images and questions without comparable annotations would not provide the same way to assign answers automatically.

Even within GQA, the paper explicitly identifies errors and omissions in scene graphs. A generated label is deterministic given the information the rules use, but the scene itself can contain evidence that the graph misses. The authors’ human evaluation and its examples show this limitation in both directions, with visible things missing from annotations and annotated things hard to find in the image. The generator’s guarantee is therefore conditional on the recorded representation. For a reader interpreting the test as a measure of visually grounded answers, the accuracy of that representation is part of the measurement.

The authors also flag uncertainty about why MAC and LXMERT struggle. They discuss earlier work suggesting that failures of compositional generalization can arise when a system does not divide a question into smaller tasks. Their results are consistent with that account. They also ask whether changed dataset construction could give systems fewer opportunities to learn shortcuts. The experiments vary questions and training data, so they demonstrate a behavioral difficulty and an improvement under augmentation. They leave the role of architecture and the role of dataset design unresolved.

Finally, the discussion of human accuracy notes the possibility that questions matching the selected templates are more ambiguous than GQA questions on average. This is relevant both to the sampled original questions and to the generated ones. A graph can represent an unambiguous answer internally while people have trouble deciding which object a phrase picks out or judging a property from the image. The paper’s human check captures some of that difficulty without converting every disagreement into a proven generator error.

#### Limits that follow from the experimental design

The contrasts cover specific question forms and admissible substitutions. The matching rate indicates that much of the original GQA data lies outside the generator’s scope. Even among matched questions, an edit can fail because no available candidate satisfies the necessary conditions. The resulting challenge therefore concerns questions for which the authors’ rules can produce a different, graph-supported answer. It offers concrete evidence about those forms, including object and relational substitutions. It cannot stand in for arbitrary changes to visual questions or every kind of composition in GQA.

Keeping the photograph fixed is a strength for interpreting the edit and a limit on the type of generalization being measured. The study asks a different question about an existing scene, with most of the original wording preserved. It does not establish how the same systems would respond to an altered image, completely different wording, or combinations beyond the selected templates. The generated examples may be outside the ordinary training distribution in the relevant way even though the images and question forms are drawn from GQA.

There is also a difference between small edits and matched difficulty. A revised question can preserve nearly the entire wording yet introduce a rare referent, a visually crowded region, a less familiar relative position, or a graph label that is hard to ground. The generator uses textual similarity and cross-scene associations to find plausible candidates, and it verifies the answers through the graph. Those procedures do not provide an independent difficulty rating for each original–edit pair. The template and human analyses help characterize the challenge, but they cannot make every substitution equally demanding.

The training results establish improvement on validation contrasts constructed by the same procedure. That is a meaningful test of whether systems can learn from these changes across the training and validation splits. It leaves open how well the advantage extends to human-authored edits or to challenges with different construction rules. It also leaves open whether the added examples encourage more reliable visual grounding or supply reliable cues specific to the generated questions. The fixed-size control addresses the amount of data. It does not separate these explanations of what the systems learn.

Consistency has an additional interpretive constraint. It counts a group with any error as unsuccessful, regardless of where the error occurs or how many answers within the group are correct. A larger group can therefore have a lower success rate through the accumulation of errors even if the individual edits have similar difficulty. The measure directly answers whether a system handles the full collection around an original question. The comparison across caps gives that answer under different group conditions. Further information about which items fail together would be needed to characterize dependencies among errors.

The paper gives different counts in its generation statistics and performance tables for apparently related settings. It also reports training generation totals separately from the pool used for the main retraining experiment. The reported accuracies remain interpretable for the conditions under which the authors present them. The counts leave open how many generated questions carried through every stage of selection and how the reported collections correspond in detail. That uncertainty limits comparisons that depend on reconstructing the exact makeup of an evaluated set from the generation tables.

### What came after

The citing works take up related questions about visual composition, failure analysis, and counterfactual examples. Their relationship to the scene-graph study is clearest at the level of what each work sets out to measure or teach. The citations establish a connection to the paper. Their titles identify the direction of that connection without settling whether any of them reused the GQA templates, graph checks, or generated questions.

[Winoground](https://md.research.elamur.ai/free/en/papers/thrush-2022-winoground-probing-vision-language-models/) probes how vision and language systems handle compositional meaning. It shares the scene-graph paper’s interest in testing whether systems respect how parts of a description fit together. In the GQA study, a nearby question can name a different object while leaving the rest of the prompt recognizable. The related concern in Winoground is visio-linguistic compositionality itself. The connection is the use of a probe that makes composition an explicit subject of evaluation.

[COVR](https://md.research.elamur.ai/free/en/papers/bogin-2021-covr-test-bed-visually-grounded/) provides a test bed for visually grounded compositional generalization using real images. It shares with the GQA study the emphasis on answering from visual evidence when the components of a request are combined in a new way. The difference in emphasis is visible in the tasks the works name. The scene-graph study constructs local contrasts around existing GQA questions. COVR frames the related problem as a test bed for generalization in visually grounded settings.

[The Dangers of Underclaiming](https://md.research.elamur.ai/free/en/papers/bowman-2022-dangers-underclaiming-reasons-caution-when/) addresses how to report failures of language systems with appropriate caution. That concern applies directly to the interpretation of a contrast-set result. A system can fail on a question that tests a particular distinction, and the failure is evidence about its response under those conditions. Claims about the general capability require attention to which questions were chosen, how their labels were established, and which alternative explanations remain. The human comparison and the discussion of graph errors in the GQA paper make those interpretive issues concrete.

[Teaching Small Language Models Reasoning through Counterfactual Distillation](https://md.research.elamur.ai/free/en/papers/feng-2024-teaching-small-language-models-reasoning/) makes counterfactuals part of a teaching procedure for reasoning. Its connection is to the training side of the GQA study. Bitton and colleagues use answer-changing variants to test behavior and then include such variants in training to help systems handle similar distinctions. The later work’s stated focus is counterfactual distillation for small language systems. In both formulations, a changed case can carry information about which part of an input should change the output.

## Cite

Cite as Yonatan Bitton, Gabriel Stanovsky, Roy Schwartz and Michael Elhadad. 2021. Automatic Generation of Contrast Sets from Scene Graphs: Probing the Compositional Consistency of GQA. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2021.naacl-main.9](https://doi.org/10.18653/v1/2021.naacl-main.9)

```bibtex
@inproceedings{bitton2021automatic,
  title = {{Automatic Generation of Contrast Sets from Scene Graphs: Probing the Compositional Consistency of GQA}},
  author = {Yonatan Bitton, Gabriel Stanovsky, Roy Schwartz and Michael Elhadad},
  booktitle = {Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.9},
  url = {https://doi.org/10.18653/v1/2021.naacl-main.9}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
