Elamur Research

Knowledge Generation for Zero-shot Knowledge-based VQA

Paper · 2024 · Rui Cao and Jing Jiang

Summary

A photograph can show a jet and the white trail behind it, yet leave the name of that trail to the person answering the question. This is the problem of knowledge-based visual question answering, which asks a system to connect something visible with information about the world. Cao and Jiang investigate whether it helps to write that information down before attempting an answer. Their method, KGenVQA, turns the image into descriptions that emphasize regions relevant to the question, generates background statements from those descriptions, and gives the statements to a text-based question answerer. The result is an intermediate piece of text that a reader can inspect alongside the answer. Question answering

The method generates background knowledge in successive passes. It first uses six hand-written examples to elicit a statement for each question and its image descriptions. It then groups those initial examples by similarity and draws examples from different groups to prompt further generations. Changing the examples gives the system a way to explore different aspects of the same question. The examples for this second pass come from its own outputs, so the authors can run the procedure without fitting new parameters or using reference answers from the target benchmark as demonstrations.

Adding generated statements improved soft accuracy across the main paired comparisons on OK-VQA and the A-OKVQA validation split. With UnifiedQA 3B on OK-VQA, soft accuracy rose from 39.6 to 44.5. With UnifiedQA 11B, KGenVQA reached 45.4 on OK-VQA and 39.1 on the A-OKVQA validation split. Those configurations led the paper’s main comparison with earlier zero-shot systems that also required no extra training. An extended comparison includes larger configurations of an earlier system that score higher, so the ranking depends on which configurations enter the comparison.

The generated statements were generally grammatical, relevant, and factual in a human review of cases whose answer correctness changed. Helpfulness varied considerably across statements for the same question. The review’s average helpfulness score was 67.0, while taking the best of the 5 statements per question yielded 90.0. The answer experiments likewise found that a small collection could help and that adding more statements could erode the gain. The method makes background information visible and sometimes supplies exactly the bridge the answerer needs. It can also turn a thin or inaccurate caption into a fluent but misleading account of the scene.

Deep dive: Knowledge Generation for Zero-shot Knowledge-based VQA

KGenVQA generates background knowledge from image captions and questions, then tests whether those statements improve zero-shot visual question answering. · about 32 minutes to read

The problem and its context

What the picture leaves to the answerer

A question about an image can require the answerer to identify an object, recognize what is happening, or notice which part of the scene the question refers to. A knowledge-based question adds another demand. Once the relevant part of the scene has been identified, the answerer must connect it with some fact, category, or regularity that the picture leaves unstated. A person can see a plume behind an aircraft and still need to know what such a plume is called. The same image might support another question whose answer depends on an completely different part of the scene. This dependence on the question places the task within vision and language.

The paper illustrates that distinction with a question involving national parks in California and black bears. A useful answer path may require identifying which parks belong in the relevant geographical set and then establishing which of them fits the association with bears. A description of the image can set the topic, but the question determines which background relationship matters. Even a sentence that correctly names the visible animal could leave the answerer without the geographical knowledge. Conversely, a broadly relevant statement about parks could pass over the association that narrows down the answer.

The practical challenge is to get the right information into the answer procedure for each case. The system has to make the scene usable to the component that handles language. It also has to decide what to bring in from outside the scene. Those decisions interact. A question can refer to something indirectly, in which case a description helps resolve its subject. A description that leaves the referent vague also leaves the knowledge-generation step with a broader and less reliable task. The paper’s design makes this interaction especially visible because the text produced at each stage can be read on its own.

Retrieving a fact, answering directly, or generating a fact

Earlier knowledge-based VQA systems, as the paper describes them, looked up relevant material in resources such as ConceptNet or Wikipedia. They then trained a visual question answerer with large collections of examples containing an image, a question, and an answer. That approach puts some external information in a form the system can use and gives the answerer labeled examples of how to use it. Its feasibility depends on a resource that covers the required facts and a substantial collection of labeled instances for the task. The retrieval stage belongs to the broader problem of information retrieval.

The paper describes a second family of approaches built around pretrained language systems. These approaches make an image accessible to the answerer by translating it into captions or into a representation compatible with the text component. With a textual input, the system can pose the question alongside the image descriptions and ask for an answer. Relevant background facts may already be available through pretraining. This moves much of the work into deciding how to present the image and how to prompt the answerer. The paper relates this ability to answer from a prompt to GPT-3.

A short direct answer gives the reader little evidence about which background fact entered into the prediction. Consider the jet example. The answer string can be correct even when the system supplies no account of the relationship between the aircraft and the visible trail. When it gives a wrong label, the answer alone leaves several explanations open. It may have missed the trail, interpreted the description incorrectly, or lacked the relevant term. Exposing a statement before the answer gives the reader another place to examine what information the system had available. That is the aspect of interpretability the authors address.

The term zero-shot still leaves room for substantial differences in resources. The paper distinguishes methods assembled from already pretrained components from methods that train an additional component on labeled data outside the knowledge-based VQA task. Frozen, for instance, learns a projection from paired images and text. BLIP-2 learns a Q-transformer to couple visual and textual processing. These systems can face the target questions without being fitted on that task’s answer labels, but they involve additional training of the visual and language interface. The paper treats that training as relevant to the fairness of the comparison. Frozen · BLIP-2

Other methods compose existing components without this extra training. PICa captions the image and passes a question and description to GPT-3. PNP-VQA first identifies image regions likely to matter to the question, then generates captions that emphasize those regions. Img2LLM uses the same style of captioning and builds synthetic questions and answers from the captions to provide demonstrations for the final answer prompt. Cao and Jiang use those approaches to set the experimental context. They inherit the question-aware captioning procedure from PNP-VQA and, in the OPT answer configuration, retain the idea of synthetic answer demonstrations.

Access to demonstrations introduces a separate distinction. The paper describes versions of PICa and PromptCap that dynamically select examples from a large labeled training pool for each test question. A prompt contains only the selected items, but the system still needs the pool in order to construct it. PromptCap also relies on training for its question-conditioned captioning component. For Cao and Jiang, the amount of labeled data available to an approach matters alongside the number of examples present in an individual prompt. The paper therefore treats those comparisons separately from the main zero-shot results. Few-shot learning

Why put background knowledge in writing?

The immediate precedent came from text-based question answering. As the paper recounts it, earlier work prompted pretrained language systems to produce short commonsense statements or longer passages and then supplied that generated text to a question answerer. The studies gave Cao and Jiang a reason to ask whether the same separation between generating context and producing an answer could work when the original context was an image. One strand treated generation as a way to create usable context for open-domain questions, and another examined recitation as a way to surface information before the answer. Generate rather than Retrieve · Recitation-Augmented Language Models

The transfer requires an additional step because the image must first be represented in a form acceptable to the text generator. In a text-only task, the immediate question and its written context can be presented directly. In this visual setting, what the generator can say depends partly on what the captioner makes available. The intermediate statement therefore sits at the junction of two decisions. The captioner chooses what to describe, and the generator chooses which broader information to associate with what has been described. The answerer then has to combine the statement and the visual evidence with the actual question.

This organization also makes two kinds of evaluation possible. Answer accuracy can test whether the added statements help under a fixed answer configuration. Reading the statements can show whether their content has the qualities the authors hoped to elicit. These evaluations address different parts of the problem. A sentence might provide a useful premise while the answerer still chooses the wrong response. It might also help the answerer reach the expected string by making a plausible guess about the scene. Making the distinction explicit is important when deciding what the paper’s experiments establish.

The method, step by step

From an image and question to text

KGenVQA begins with an image and its associated question. Both influence the text passed downstream. Borrowing the procedure from PNP-VQA, the authors use an image–text matching component to assign greater emphasis to regions relevant to the question. An image captioner then describes the resulting attention-weighted visual input. The process produces multiple captions, giving the following stages several textual descriptions of what may matter. The captioner is BLIP.

The authors concatenate those captions into a single token sequence. A token sequence is the ordered text representation handled by the generator. Several captions can describe overlapping details, so concatenating them can preserve complementary descriptions and can also carry repetitions into the prompt. The descriptions have a dual use in the method. They ground the request for background knowledge and remain available to the component that eventually answers the question. Tokenization

The separation between a caption and a knowledge statement is easiest to see in the jet case. A description can point out that the image contains an aircraft with a white trail. A background statement can connect trails of that kind with the term contrail. The answerer has access to both the indication of what is visible and the association that supplies a candidate label. In other examples, a useful statement gives a property or a conditional relationship, leaving the answerer to connect it to the pictured object. The authors use the same stages for both kinds of statement.

How KGenVQA prepares knowledge and answers a question

The steps in order.

How KGenVQA prepares knowledge and answers a questionStep 1: Highlight regions relevant to the question1. Highlight regions relevant to the questionStep 2: Generate and combine question-aware captions2. Generate and combine question-aware captionsStep 3: Prompt with hand-written examples for initial statements3. Prompt with hand-written examples for initial statementsStep 4: Encode and cluster caption, question, and statement triplets4. Encode and cluster caption, question, and statement tripletsStep 5: Sample demonstrations across the other clusters5. Sample demonstrations across the other clustersStep 6: Repeat prompting to generate alternative background statements6. Repeat prompting to generate alternative background statementsStep 7: Answer using the question, captions, and statements7. Answer using the question, captions, and statements

Write an initial statement for every question

The knowledge prompt presents the captions as context, gives the question, and asks for related background information. The expected continuation is a sentence that can be used as a knowledge statement. Examples in the prompt establish the intended relationship among the descriptions, the question, and the continuation. The examples demonstrate a text behavior, and the prompt uses them without updating the generator’s parameters.

In the initial pass, the authors use six hand-written demonstrations. Each shows what a background statement looks like for a given set of captions and a question. The facts for these examples were collected through Google searches. This search was part of authoring the prompt. The benchmark procedure generates statements through the pretrained text system at inference time. The distinction matters to the resource claim because manual preparation supplied the starting examples while the subsequent prompts and statements were created automatically.

The demonstrations illustrate several ways a statement can help. An example with a person wearing glasses connects the item with its general purpose. A food example illustrates supplying information about nutrients and visible ingredients. A tennis example points towards a named tournament associated with the sport. Depending on the question, the intermediate text can look like a general fact, a likely association, or a bridge toward a short answer. Taken together, the examples show how captions can guide the choice of background information even when the question refers to an object without naming it.

The generator produces an initial statement for each image–question pair. The output is stored with the captions and question that prompted it. This gives the authors a collection of complete examples to draw on in the next pass. Its scope is the input collection being evaluated. The method uses those inputs as material for preparing demonstrations, a detail that becomes important when considering how the system would handle a single question in isolation.

Kⁱⁿⁱᵗ = { (Cᵢ, Qᵢ, Kᵢ) }ᵢ₌₁ᴺ

Kⁱⁿⁱᵗ is the collection assembled in the initial generation pass, and the superscript init labels that pass. Each parenthesized tuple is one example. Cᵢ is the concatenated caption text for example i, Qᵢ is its question, and Kᵢ is the generated statement associated with that caption and question. The subscript i identifies an example and ranges from 1 through N, the number of examples in the collection. The braces denote the collection of tuples, and the equals sign defines its contents.

The authors call these examples silver-labeled. The label in this usage is the generated knowledge sentence, and its origin is the completion produced by the generator. The initial pass supplies a proposed continuation without having an annotator certify its content. Since the next pass consumes complete examples, it sees the kind of question and caption context that elicited each sentence. It can learn from the form of the example in the immediate prompt even when the example’s subject is unrelated to the current question.

Vary the examples that guide the next statement

The authors want the final collection for a question to cover different aspects of what might be useful. Returning multiple continuations from a fixed prompt is one way to gather candidates. The paper notes that beam search can give repetitive continuations, and that sampling from a restricted set of likely tokens addresses this only to a degree. Its chosen intervention is to vary the demonstrations carried by the prompt itself. The intuition is that changing the examples can direct the same generator toward different kinds of background information. The Curious Case of Neural Text Degeneration

To choose varied examples, the authors join the caption, question, and initial knowledge text of each record and encode the combined text into a vector with BERT. The vector provides a numerical representation that can be grouped with other representations. The authors then apply K-means, which assigns the vectors to clusters according to their positions relative to cluster centers. Because the encoding is constructed from all parts of the record, the grouping can reflect similarities in the described scene, the question, and the kind of statement generated. The paper sets the number of clusters empirically to 8. BERT

Kⁱⁿⁱᵗ₁, Kⁱⁿⁱᵗ₂, …, Kⁱⁿⁱᵗₖ, …, Kⁱⁿⁱᵗₖₘₐₓ

Each Kⁱⁿⁱᵗ with a numerical subscript denotes a group of initial examples. The subscripts 1 and 2 identify the first and second groups, k identifies an arbitrary group, and the ellipses stand for the intervening groups. The final subscript written here as kₘₐₓ is the number of groups, which the paper denotes by upper-case K when specifying the cluster count. The superscript init again refers to the source of the triplets in these groups. This notation distinguishes the group labels from Kᵢ, which names an individual generated statement in the initial collection.

For a given image–question pair, the authors look up the cluster that contains its initial record. They leave that cluster out and randomly choose an example from every other group. Sampling across groups is intended to vary the demonstration content within each prompt. Randomly drawing again for later prompts is intended to vary the guidance the generator receives across attempts for the same question. The design favors coverage across the available groups, and the target’s own initial statement stays out of its demonstration set.

K − 1

K is the total number of clusters, the minus sign denotes subtraction, and 1 is the cluster containing the current question’s initial record. The expression gives the number of demonstrations in an individual diversified prompt because the procedure draws one example from each eligible cluster. The current record determines the excluded cluster on every repetition for that question.

The authors repeat the sampling and generation procedure T times for the same input. The target captions and question stay fixed. The examples attached to the request can change with each draw. The outputs are several candidate background statements for use by the answerer. Clustering is applied to the initial examples used to build the prompts, so the method encourages variation before generation. Whether the resulting statements genuinely cover distinct information remains an empirical question.

k₁, …, kₜ, …, kₜₘₐₓ

Here, k₁ is the first diversified statement for the current question and kₜ is the statement from repetition t. The ellipses indicate the intervening outputs. The final subscript tₘₐₓ marks T, the total number of repetitions and thus the intended number of final statements. In this expression lower-case k denotes a piece of generated knowledge, while in the cluster notation the subscript k was an index used to identify a group.

The authors refer to this stage as self-supervised knowledge diversification because the prompt examples are built from the initial generated records. A human supplies the seed examples but does not have to write a fresh set of diverse knowledge annotations for the evaluated questions. The only fitted grouping in this step is the clustering of the encoded records. The captioner, text generator, and answerer already come pretrained, and the paper does not update them for the target VQA task. The authors compare cross-cluster sampling with draws from the same initial pool that ignore the cluster boundaries.

Give the statements to the answerer

The final stage combines the generated knowledge, captions, and question for text-based answering. The knowledge generator and the answerer may be drawn from the same family or use different systems. This separation is central to the experimental design. The authors can hold the question and captions fixed, add or remove knowledge, and see how the prediction changes. They can also keep the answerer fixed and change the source of the statements.

With UnifiedQA, the authors use a fusion-in-decoder procedure inherited from PNP-VQA. In this kind of answer generation, context inputs are encoded separately and their representations become available together to the decoder that writes the response. This arrangement is designed to let the decoder use several sources of context. It differs from the flat concatenation of context used for the decoder-only answer configurations. The paper draws the fusion procedure from earlier work on supplying multiple retrieved passages for open-domain questions. UnifiedQA · Fusion-in-decoder

With OPT, the authors also add synthetic question–answer demonstrations, following Img2LLM. Those examples are produced from the captions and serve a different role from the triplets used to prompt the knowledge generator. A knowledge demonstration shows what kind of statement to write from a scene description and a question. A synthetic answer demonstration shows how an answer is produced from the available textual context. KGenVQA can add background statements to an answer procedure that already uses such demonstrations. OPT

The main discussion uses the label GPT-3 for generation and for the GPT answer comparison. The implementation details specify GPT-3.5, with text-davinci-003 and a generation temperature of 0.7 for the knowledge stage. Temperature controls how strongly the generator favors its most likely continuations during sampling. It is distinct from the cluster procedure, which changes the examples that shape the distribution of continuations in the first place.

For answer prediction, the authors encourage short responses because the evaluation compares the predicted answer string with reference strings. UnifiedQA uses a length penalty of -1. The GPT-3.5 prompt asks for as brief an answer as possible, and the system applies answer post-processing following earlier work. This part of the design separates the form of the two outputs. A knowledge statement can express a relationship in a complete sentence, while the benchmark may reward a compact label at the answer stage. The authors release the implementation as KGen_VQA. OpenFlamingo

Experiments and results

What was evaluated

The authors evaluate on OK-VQA and A-OKVQA. OK-VQA supplies questions for which information beyond the image is needed. A-OKVQA broadens the kinds of world knowledge called for. The OK-VQA evaluation uses 5, 046 questions. For A-OKVQA, the authors use the validation split of 1, 100 questions because the test references are unavailable to them. The split matters for interpreting every A-OKVQA result, including the comparisons with earlier systems. A-OKVQA

The reported measure on both benchmarks is soft accuracy. A question can have multiple human reference answers, and the measure gives credit according to how the predicted response matches those references. The authors’ emphasis on short answers concerns the string matching used to determine agreement. Soft accuracy concerns how reference agreement contributes to the score. A correct-looking explanation in a knowledge statement is outside this measurement unless the final answer earns credit. Making the V in VQA Matter

The experiments give different kinds of comparisons. In the paired runs, the authors compare their own answer pipeline with and without generated knowledge for the corresponding answer setup. In the comparisons with prior systems, entire pipelines differ. The paired runs are the more direct test of adding generated content. The cross-system figures show how the resulting pipeline ranks under the chosen comparison conditions. This distinction is important because captioning, prompting, and the answer component can each affect absolute accuracy.

How much generated knowledge helps in the paired runs

On OK-VQA, UnifiedQA 0.7B scores 32.3 without generated knowledge and 39.7 with it. UnifiedQA 3B moves from 39.6 to 44.5, and UnifiedQA 11B moves from 43.7 to 45.4. These are soft accuracy scores on the OK-VQA evaluation set. The advantage occurs at every tested UnifiedQA size, although the unaugmented and augmented runs are closer together at the largest tested size. The paired comparisons establish that the effect appears with the authors’ implementation of UnifiedQA and its fusion procedure.

The same direction holds on the A-OKVQA validation split. UnifiedQA 0.7B scores 29.0 without generated knowledge and 31.6 with it. UnifiedQA 3B scores 35.5 and 36.5, respectively. UnifiedQA 11B scores 38.9 and 39.1. The margin in the last pair is small. Reporting it alongside the stronger changes on OK-VQA shows why the effect is best described as consistently positive across these main paired settings, with the strength of the gain depending on the benchmark and configuration.

OPT gives the paper another way to test the intervention. Its setup supplies synthetic demonstrations for answer prediction, so adding generated statements tests whether they contribute in a prompt that already contains examples of answering. On OK-VQA, OPT 6.7B scores 35.2 without generated knowledge and 39.2 with it. OPT 13B scores 37.3 and 40.2, and OPT 30B scores 37.7 and 42.2. The comparable A-OKVQA validation scores are 32.4 and 35.9 for OPT 6.7B, 35.1 and 36.0 for OPT 13B, and 34.4 and 38.1 for OPT 30B.

The authors also test GPT as an answerer on the first 500 questions in OK-VQA, limiting the run because of API cost. Soft accuracy on that subset is 27.4 without generated knowledge and 34.1 with it. Those figures belong to the same subset and form a paired result there. They describe a different evaluation scope from the full OK-VQA comparisons with UnifiedQA and OPT, so the relative levels across those runs cannot by themselves rank the answerers.

The OPT comparison has an extra implementation detail. The authors reuse the Img2LLM authors’ code to generate synthetic questions and answers, but their implementation choices and demonstration counts differ. As a result, the paper reports paired OPT results using its own baseline and reports Img2LLM’s published scores in the cross-system comparison. An OPT row without generated knowledge and an Img2LLM row can therefore have different values even when the nominal size is the same. Each belongs to its own comparison.

How the full systems compare

PICa zero provides an earlier direct-answer comparison. It passes a caption to GPT-3 as context for the question. PNP-VQA supplies question-aware captions and uses UnifiedQA with fusion in the decoder. Img2LLM uses question-aware captioning and constructs synthetic answer demonstrations before prompting OPT. The following OK-VQA results compare representative configurations from the paper’s main group of earlier systems without extra training with the authors’ configurations.

Main zero-shot comparison without extra training on OK-VQA

The strongest KGenVQA configuration leads the systems in this comparison.

Main zero-shot comparison without extra training on OK-VQAPICa zero 175B: 17.7PICa zero 175B17.7PNP-VQA 0.7B: 27.1PNP-VQA 0.7B27.1PNP-VQA 3B: 34.1PNP-VQA 3B34.1PNP-VQA 11B: 35.9PNP-VQA 11B35.9Img2LLM 6.7B: 38.2Img2LLM 6.7B38.2Img2LLM 13B: 39.9Img2LLM 13B39.9Img2LLM 30B: 41.8Img2LLM 30B41.8KGenVQA UnifiedQA 3B (this paper): 44.5KGenVQA UnifiedQA 3B (this paper)44.5KGenVQA UnifiedQA 11B: 45.4KGenVQA UnifiedQA 11B45.4KGenVQA OPT 30B: 42.2KGenVQA OPT 30B42.2
The numbers
System or settingSoft accuracy
PICa zero 175B17.7
PNP-VQA 0.7B27.1
PNP-VQA 3B34.1
PNP-VQA 11B35.9
Img2LLM 6.7B38.2
Img2LLM 13B39.9
Img2LLM 30B41.8
KGenVQA UnifiedQA 3B (this paper)44.5
KGenVQA UnifiedQA 11B45.4
KGenVQA OPT 30B42.2

The UnifiedQA 3B configuration reaches 44.5 on OK-VQA, ahead of the earlier no-extra-training configurations in this main comparison, including Img2LLM 30B at 41.8. Within the OPT configurations of the same nominal size, KGenVQA OPT 30B scores 42.2 and the published Img2LLM 30B result is 41.8. That comparison shows where the complete pipelines land. The paired result of 37.7 without knowledge and 42.2 with it isolates the intervention more closely inside the authors’ OPT implementation.

The main A-OKVQA comparison includes several Img2LLM sizes. KGenVQA’s UnifiedQA 3B configuration at 36.5 sits below Img2LLM 30B at 36.9. KGenVQA’s UnifiedQA 11B and OPT 30B configurations both exceed that Img2LLM score. The chart uses the values from the main comparison. The paper’s expanded A-OKVQA comparison gives 33.3 for Img2LLM 6.7B, whereas the main result gives 32.3 for that configuration. The comparison between the best KGenVQA configuration and Img2LLM 30B uses scores that agree across the relevant results.

Main zero-shot comparison without extra training on A-OKVQA validation

KGenVQA with UnifiedQA achieves the highest soft accuracy among the displayed configurations.

Main zero-shot comparison without extra training on A-OKVQA validationImg2LLM 6.7B: 32.3Img2LLM 6.7B32.3Img2LLM 13B: 33.3Img2LLM 13B33.3Img2LLM 30B: 36.9Img2LLM 30B36.9KGenVQA UnifiedQA 3B (this paper): 36.5KGenVQA UnifiedQA 3B (this paper)36.5KGenVQA UnifiedQA 11B: 39.1KGenVQA UnifiedQA 11B39.1KGenVQA OPT 30B: 38.1KGenVQA OPT 30B38.1
The numbers
System or settingSoft accuracy
Img2LLM 6.7B32.3
Img2LLM 13B33.3
Img2LLM 30B36.9
KGenVQA UnifiedQA 3B (this paper)36.5
KGenVQA UnifiedQA 11B39.1
KGenVQA OPT 30B38.1

The paper’s extended comparisons include larger configurations of Img2LLM. Img2LLM 175B reaches 45.6 on OK-VQA and 42.9 on A-OKVQA validation. Both scores exceed the best KGenVQA scores on their respective datasets. The authors’ main comparison thus shows strong results against its selected configurations, including systems of comparable nominal size. The extended results define the boundary of that ranking when systems of substantially larger nominal size enter the comparison.

The scores against methods with extra training or access to labeled task examples are mixed. On OK-VQA, BLIP-2 with FlanT5 XL records 40.7, and the FlanT5 XXL configuration records 45.9. Flamingo 3B scores 41.2, while Flamingo 9B scores 44.7. The best KGenVQA result of 45.4 sits between those two higher published scores, 44.7 and 45.9. These results put the no-extra-training pipeline in context while retaining the paper’s distinction about which resources the systems use. Flamingo

For approaches that select labeled examples, PICa few scores 40.8 on OK-VQA and 18.1 on A-OKVQA validation. PromptCap scores 48.7 on OK-VQA and 56.3 on A-OKVQA validation. The best KGenVQA configuration scores above PICa few and below PromptCap on each dataset. The A-OKVQA values in particular make the extent of that difference clear without relying on a qualitative description such as comparable performance.

Changing the generator and adding answer demonstrations

The authors test whether the background statements have to come from GPT. They hold the question answerer at UnifiedQA 3B and evaluate on OK-VQA. Its soft accuracy is 39.6 without generated knowledge. It reaches 42.1 with statements from LLaMA 7B and 42.5 with statements from LLaMA 13B. The configuration using GPT-3 to supply knowledge reaches 44.5. Both LLaMA variants improve the same answer setup, and the larger tested LLaMA variant gives the higher score within that pair. The experiment tests specific generators and sizes under one answer configuration. LLaMA

The paper also moves beyond its main zero-shot setting in a small set of OK-VQA comparisons with answer demonstrations. Each example provides a question, an image description, and an answer. The version with knowledge also presents related background information. OPT 13B with 32 demonstrations scores 36.1 without knowledge and 39.6 with it. OPT 30B with 16 demonstrations scores 36.7 and 43.8. These are useful within-configuration comparisons because the corresponding knowledge-free run uses the same count of demonstrations. They show that the intervention can help when the answerer already receives examples, under the specific demonstration setups the paper evaluates.

What the ablations show

The choice of demonstrations matters

The paper compares different ways to obtain the intermediate statements. The manual setting passes along the initial statement generated with the fixed hand-written prompt. The random setting creates new prompts from the initial pool by drawing demonstration examples without enforcing cluster coverage. KGen draws across clusters as described in the method. A chain-of-thought condition asks GPT to write relevant knowledge and then give an answer in the same continuation, using versions of the hand-written demonstrations to which the authors add answers. Chain-of-Thought Prompting

For this OK-VQA analysis, the table based on UnifiedQA 3B reports soft accuracy of 35.9 with 1 statement from the fixed manual prompt and 37.5 with 1 statement from the chain-of-thought condition. It gives 41.8 for random diversification with 10 statements and 44.8 for cluster-based diversification with 10. The paper limits its chain-of-thought experiment to a subset of 200 OK-VQA questions because of cost. These are the values from the knowledge-generation ablation, whose comparison should be read within that analysis rather than substituted for the full-set results elsewhere in the paper.

Knowledge-generation strategies in the OK-VQA ablation with UnifiedQA 3B

Across-cluster sampling yields the highest soft accuracy and beats random sampling at the same statement count.

Knowledge-generation strategies in the OK-VQA ablation with UnifiedQA 3BManual prompt, 1 statement: 35.9Manual prompt, 1 statement35.9Chain of thought, 1 statement: 37.5Chain of thought, 1 statement37.5Random sampling, 10 statements: 41.8Random sampling, 10 statements41.8Across-cluster sampling, 10 statements (this paper): 44.8Across-cluster sampling, 10 statements(this paper)44.8
The numbers
System or settingSoft accuracy
Manual prompt, 1 statement35.9
Chain of thought, 1 statement37.5
Random sampling, 10 statements41.8
Across-cluster sampling, 10 statements (this paper)44.8

Random sampling versus cluster-based sampling provides the cleanest comparison of those bars for interpreting the sampling rule. The demonstrations come from the same pool of initially generated examples, and the final answerer receives the same number of statements. Enforcing coverage across clusters produces the higher result in that comparison. The paper also reports 38.8 for a configuration that passes a single KGen statement to the answerer. The comparison with 35.9 for the manual prompt holds the statement count fixed and gives some evidence that the later prompting strategy contributes even before its multiple outputs are combined.

The full manual-to-KGen comparison captures more than one change. The manual configuration provides a single statement and uses a fixed set of examples. KGen samples from the generated pool and can give the answerer several statements. Those two changes can both make a difference, as the equal-count results suggest. The methods also differ in how the examples are sourced. The human-written examples seed the process, while the later examples match the format of questions and captions encountered in the evaluation collection. The results show an advantage for the combined procedure without estimating a separate contribution for every one of these properties.

Chain-of-thought changes how the prompt couples the statement to the answer. Its demonstrations show the intermediate knowledge followed by a response. The KGen procedure generates candidate knowledge independently before the answerer uses it. In a related comparison where GPT generates the answers, the paper reports soft accuracy of 29.3 for the direct chain-of-thought answers and 32.0 when the answer prompt uses KGen knowledge. The result favors the tested KGen setup. Because the conditions differ in the number and arrangement of knowledge statements, the comparison supports the full procedure more directly than a general claim about the value of writing a reasoning chain.

More statements can eventually lower accuracy

A separate OK-VQA ablation changes the number of statements the answerer receives. UnifiedQA 3B with fusion in the decoder scores 39.6 with 0 statements and 44.5 with 5. It stays at 44.5 with 10 and falls to 42.7 with 20. The extra context helps over the no-knowledge condition even at 20 for this configuration, but the largest collection in the sweep performs below the smaller collections. This pattern makes the amount of knowledge an important part of the intervention.

OPT 13B exhibits a sharper decline after its highest-scoring setting. Soft accuracy is 37.3 with 0 statements, 40.2 with 5, 37.2 with 10, and 37.2 with 20. On the first 500 OK-VQA questions, GPT reaches 27.4 with 0, 34.1 with 5, 32.4 with 10, and 31.7 with 20. The subset restriction applies throughout the GPT sweep. The common pattern is that adding an initial set is beneficial, while adding further statements eventually gives up some of that improvement.

The authors suggest that later additions introduce redundancy or noise. They also suggest that fusion in the decoder may make it easier to handle several contexts than the long concatenated prompt used with OPT and GPT. The UnifiedQA result remains at its peak when going from 5 to 10 statements, whereas both decoder-only configurations fall. That is consistent with the proposed account. The comparison varies the answer systems and their ways of integrating context together, so it leaves the architectural explanation open. The sweep directly establishes how the tested configurations respond to different input counts.

This analysis puts the diversity result in perspective. Varied knowledge can increase the opportunities for a useful association to appear. Every additional statement also becomes something the answerer may attend to, even when it repeats an earlier sentence or pushes toward a competing answer. The score therefore depends on the combination of the knowledge the procedure generates and the answerer’s handling of that knowledge. Coverage in the candidate set and reliable use of what it covers are distinct empirical questions.

How much of the comparison depends on captions?

The paper follows up on PICa zero because its single-caption setup gives it a different visual input budget from the main KGenVQA procedure. In an OK-VQA variant in which KGenVQA also uses a single image caption, the authors report soft accuracy of 33.8. The published PICa zero result is 17.7. The authors describe the separation as about 16 points of absolute accuracy. Matching the caption count removes one possible explanation for the entire separation. Captioning, prompts, and answering still differ between the approaches.

The authors also test giving UnifiedQA 3B the generated knowledge without passing the image captions as additional answer context. This setting scores 33.5 on OK-VQA. The result indicates that information usable by the answerer survives in the written statements themselves. The knowledge-generation procedure is still grounded in image descriptions. The change concerns what is supplied at the answer stage, so it tests whether the statements can carry some of the information that would otherwise have been present in the captions.

These results complement the paired comparisons. The main with-and-without-knowledge runs ask what happens when the authors add statements while preserving the relevant answer configuration. The single-caption run asks whether KGenVQA can retain an advantage over PICa zero when restricted to the same number of descriptions. The knowledge-only context run asks what the generated text can transmit when the answerer cannot consult the descriptions separately. The scores correspond to different interventions and support different claims.

What people found in the generated statements

The human evaluation looks directly at the intermediate text. The authors sample 40 OK-VQA cases in which the correctness of the answer changes after generated knowledge is added. The sample can therefore include a wrong answer that becomes correct and a correct answer that becomes wrong. Two annotators examine 5 statements for each case. They can see the image, the question, the reference answer information, and the generated sentence. The authors withhold whether the change in prediction was beneficial or detrimental.

The review distinguishes grammaticality, relevance, factuality, and helpfulness. Grammaticality concerns whether the sentence is well formed and understandable. Relevance concerns its relationship to the question and the pictured subject. Factuality is a judgment of whether the statement is substantially correct, with some allowance for generalizations that have uncommon exceptions. These criteria can point in different directions. A sentence can be fluent and about the right topic while still supporting the wrong response.

Helpfulness gives the annotators a way to assess that last distinction. They can judge a sentence helpful if it supplies direct or indirect support for a reference answer. They can mark it harmful if it endorses a wrong answer or works against a correct one. Neutral sentences contribute neither kind of support. An illustration in the paper concerns a question about a spider. A general statement about the legs of arachnids can help if the answerer connects the pictured spider to the broader category. A fact that shares the topic without resolving the property under question may remain neutral. This evaluation looks at potential usefulness given the image and the reference answer.

The average agreement across the four criteria is 0.67 in Fleiss kappa, which the authors describe as substantial. Kappa expresses agreement while accounting for agreement expected by chance. The reported criterion scores average the annotators’ judgments. The authors summarize the collection for a question both by averaging over its 5 statements and by giving it credit for the best statement on each criterion.

For the average across statements, the grammaticality score is 99.0, relevance is 100.0, factuality is 94.5, and helpfulness is 67.0. Using the best statement per question, the scores are 100.0 for grammaticality, 100.0 for relevance, 96.3 for factuality, and 90.0 for helpfulness. The helpfulness scores display a much wider separation than the others. In these reviewed cases, a collection frequently contains helpful information even when some of the individual statements are less useful. The maximum reflects the presence of a strong candidate under human judgment. The accuracy experiments measure what the answerer actually does when given a collection.

The authors separately ask whether selecting demonstrations across clusters yields broader knowledge. They compare sets of 5 statements from the cluster-based and random strategies. Average diversity is 3.4 for across-cluster sampling and 2.5 for random sampling. The difference in judged coverage aligns with the ordering in the equal-count answer comparison. Taken jointly, the analyses show that the prompting strategy affects an observable property of the statements as well as the final score. They leave open how much of the score advantage comes specifically from coverage as opposed to other changes in what the prompts elicit.

What changed in individual answers

The case study reviews the first 20 OK-VQA cases in which KGenVQA with UnifiedQA 3B gives a correct answer and the corresponding baseline without knowledge gives a wrong one. The authors attribute 85% of those baseline errors to missing external knowledge. The selection rule makes this a study of corrected cases. Within that group, it can reveal what kinds of omission the method repaired. The estimate applies to those cases and does not measure the composition of all baseline errors.

One example asks what would happen if the pictured objects fell. The knowledge statement invokes how glass behaves on impact, and the final response says the objects would break. The baseline had predicted that nothing would happen. In the jet case, the baseline supplies a different label, while the added statement gives the name for a condensation trail and the final answer uses that term. In each case the written statement makes it possible to identify a plausible link between the visual subject and the improved answer. The case displays one piece of generated knowledge for readability, although the method can supply several pieces to the answerer.

The authors also manually inspect 40 errors from UnifiedQA 3B with fusion in the decoder after generated knowledge has been added. They attribute 20% of the examined errors to undesirable knowledge. Their examples trace several misleading statements back to captions that provide scant or inaccurate grounding. In a sofa example, the generated text proposes faux leather even though the descriptions give weak evidence for identifying the material. In a location example, general descriptions of a market scene become a confident claim about Prague. The claim is more specific than the supporting descriptions, illustrating how a plausible continuation can supply detail without adequate grounding in the image.

The location and glass cases show how the same mechanism can help or hinder. A general statement about glass is usable if the described objects really are glass and the question asks about an impact. A confident claim about a particular city can be misleading if the caption supplies only features shared by many places. Judging the utility of the output therefore requires considering how well the question and the descriptions support applying a particular statement to the current scene.

Limitations

Limits the authors identify

The authors identify redundant knowledge as a source of noise. Their procedure creates several statements for a question by changing its demonstrations, and some outputs can express overlapping information. The statement-count ablation shows that giving the answerer a bigger collection can lower accuracy. The authors propose investigating ways to filter redundancy in future work. The study evaluates diversification and the effect of varying how many outputs are used. A filtering procedure with measured effects remains a proposed extension.

Their other explicit limitation is the conversion of images to text. Question-aware captions direct attention and give the text components usable context, but a description can leave out a detail that matters later. That loss affects the generator’s choice of background knowledge and the answerer’s ability to check whether a statement applies. The authors propose adding generated knowledge to a pretrained vision–language system that can receive the image directly, such as BLIP-2. The experiments report results for text-based answer integration.

The error analysis gives this limitation a concrete form. A caption can correctly describe a market sign, a crowd, or a clock and still give the generator very little basis for choosing a city. If the generated statement supplies a specific location anyway, the answerer may inherit that guess as apparent context. The authors identify inaccurate or insufficient image descriptions as a main cause of misleading knowledge in their examples. Better visual grounding is their suggested direction for addressing this source of error.

Limits of what the comparisons establish

The aggregate benchmark gains establish that generated context can improve the tested answer procedure. They do not identify which candidate statement drove every successful prediction. The system puts the statements into the answerer’s input, and the authors examine examples in which a statement supplies a plausible missing link. A claim that the final prediction faithfully follows a particular written premise would require evidence tracing how the answerer uses that premise. The paper’s comparisons intervene on the presence and construction of the knowledge collection, and its human ratings concern the text available to the answerer.

There is also a difference between factual accuracy and applicability to a particular scene. A general statement can be sound and still mislead if it concerns the wrong object or context. A relevant topic can support multiple candidate answers. The review’s separate judgments for factuality and helpfulness acknowledge this distinction, as does the market example. The paper’s human scores characterize how annotators evaluated the sampled statements. They do not certify the factual grounding of every sentence generated for either benchmark.

The human evaluation is deliberately concentrated on cases with a change in answer correctness. These are useful cases for looking at the role knowledge might play because the two conditions differ in a consequential way. They are also a selected subset. Average helpfulness of 67.0 describes the statements reviewed there, and best-statement helpfulness of 90.0 describes those same cases under a different aggregation. A question whose answer is stable after knowledge is added might still receive a helpful statement, a redundant one, or a misleading statement the answerer ignores. The design leaves the frequencies of those outcomes in unchanged cases undetermined.

The case study has similar boundaries. Choosing the first 20 corrections avoids subjective selection of especially striking successes within that sequence. The cases were still selected for the fact of correction, so the 85% attribution is conditional on a favorable change. The 20% attribution to undesirable knowledge comes from a separate set of 40 inspected errors after augmentation. The two percentages describe different case collections and cannot be read as opposing rates over all evaluated questions. The soft accuracy comparisons provide the broader measure of performance.

The evaluation scope also affects the numerical claims. The main A-OKVQA experiment uses the validation split. GPT answering is tested on the first 500 OK-VQA questions, and the analysis involving chain-of-thought is constrained by a 200-question subset. Those choices give interpretable comparisons within the reported settings. Conclusions about the full OK-VQA set for GPT answering or about the withheld A-OKVQA test references would need evaluations under those conditions. The main tables give point scores, so small separations such as 38.9 and 39.1 describe the observed runs without settling how stable those separations would be under repeated sampling.

The resource claim concerns a particular meaning of zero-shot. The answer labels of the target benchmark are absent from the main inference procedure, and the authors reuse pretrained components. The second knowledge pass nevertheless benefits from a pool built by processing the evaluation inputs. The pool includes generated statements attached to other questions in that collection. An isolated new question would need a source of demonstration examples for the diversification stage. The experiments establish how the authors’ batch procedure works with an available pool and leave the performance of a separately prepared pool open.

Finally, explicit knowledge in the answer input is a form of inspectability. It lets a reader see that a sentence about glass, a named location, or a condensation trail was available during prediction. By evaluating changes when the knowledge is added, the authors show that this extra text has measurable consequences across the tested configurations. The consequences can include corrections and errors. The combination of those findings gives the reader a way to assess answer accuracy together with the quality and provenance of the intermediate text.

What came after

The subsequent use of KGenVQA in published research remains undocumented here. The paper itself identifies two directions for follow-up: filtering redundant statements before answering and supplying generated knowledge to a system that retains direct access to the image. Those proposals follow from the observed decline with larger statement collections and from errors rooted in incomplete image descriptions.

Cite

Cite as Rui Cao and Jing Jiang. 2024. Knowledge Generation for Zero-shot Knowledge-based VQA. Findings of the Association for Computational Linguistics: EACL 2024.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.findings-eacl.36

@inproceedings{cao2024knowledge,
  title = {{Knowledge Generation for Zero-shot Knowledge-based VQA}},
  author = {Rui Cao and Jing Jiang},
  booktitle = {Findings of the Association for Computational Linguistics: EACL 2024},
  year = {2024},
  doi = {10.18653/v1/2024.findings-eacl.36},
  url = {https://doi.org/10.18653/v1/2024.findings-eacl.36}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/cao-2024-knowledge-generation-zero-shot-knowledge/