Evaluation method, device, medium and computer program product for visual question answering tasks

By evaluating the accuracy and reasoning process of the visual question and answer task model through the pre-training model, the problem of insufficient accuracy and lack of interpretability in the quality evaluation of the visual question and answer task model in the existing technology is solved, and a more accurate and credible model is achieved. deploy.

CN118467709BActive Publication Date: 2024-09-24LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410924966.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-24
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

Existing visual question and answer task model quality evaluation methods have insufficient accuracy, especially when the standard answers are not unique or have similar semantics, which can easily lead to misjudgment and lack of interpretability.

Method used

Use a pre-training model to evaluate the target visual question and answer model, generate answer data by inputting question data and visual modal data, and input multi-modal data composed of generated answer data, question data and evaluation task prompt words into the pre-training model, and output Accuracy evaluation results and reasoning process data, using the semantic understanding and reasoning capabilities of the pre-trained model for accuracy evaluation.

Benefits of technology

It improves the accuracy and interpretability of model quality evaluation for visual question answering tasks, ensures the generation effect of the model in application, and deploys high-quality visual question answering models through reliable evaluation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118467709B
    Figure CN118467709B
Patent Text Reader

Abstract

This invention relates to the field of artificial intelligence technology, specifically disclosing an evaluation method, device, medium, and computer program product for visual question answering tasks. It generates answer data by inputting first multimodal data, including question data and visual modal data, into a target visual question answering model. Second multimodal data, including generated answer data, question data, evaluation task prompts, and visual modal data, is input into a pre-trained model. The evaluation task prompts carry evaluation task information and evaluation criteria, enabling the pre-trained model to accurately evaluate the generated answer data and provide reasoning process data. This improves the interpretability and reliability of the quality evaluation results of the target visual question answering model, helping to obtain more accurate model quality evaluation results. By deploying the target visual question answering model, which has passed this quality test, on the target device, the generation effect of the target visual question answering model in application is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an evaluation method, device, medium and computer program product for a visual question answering task. Background Art

[0002] Visual question answering is a new interactive method that combines computer vision and natural language processing. It aims to enable computers to understand human questions through images and questions, and give correct answers by analyzing images and questions. Before deploying a visual question answering model for visual question answering tasks, it is necessary to evaluate the model quality of the visual question answering model. Currently, most of the model quality evaluation methods used for visual question answering tasks use test data sets to test the similarity between the generated answers of the model and the standard answers. However, in practical applications, the standard answer may not be the only correct answer, or similar semantics may express completely different meanings, which may lead to misjudgment of the results.

[0003] How to improve the accuracy of model quality evaluation results for visual question answering tasks is a technical problem that technicians in this field need to solve. Summary of the invention

[0004] The purpose of the present invention is to provide an evaluation method, device, medium and computer program product for visual question answering tasks, so as to improve the accuracy of model quality evaluation results for visual question answering tasks.

[0005] In order to solve the above technical problems, the present invention provides an evaluation method for a visual question answering task, comprising:

[0006] Acquire a pre-trained model, first multimodal data, and a target visual question-answering model; the first multimodal data includes text modal data and visual modal data, and the text modal data in the first multimodal data is question data;

[0007] Inputting the first multimodal data into the target visual question answering model to generate answer data;

[0008] Acquire second multimodal data; the second multimodal data includes text modal data and visual modal data, the visual modal data in the second multimodal data is the same as the visual modal data in the first multimodal data, the text modal data in the second multimodal data includes the question data in the first multimodal data, the generated answer data and the evaluation task prompt words, and the evaluation task prompt words include the evaluation task information and evaluation criteria for the target visual question answering model;

[0009] Inputting the second multimodal data into the pre-trained model, and outputting accuracy evaluation result data of the generated answer data and corresponding reasoning process data;

[0010] A quality evaluation result of the target visual question answering model is obtained according to the accuracy evaluation result data and the reasoning process data. If the quality evaluation result is qualified, the target visual question answering model is deployed on a target device to perform a visual question answering task using the target visual question answering model.

[0011] On the one hand, the second multimodal data is input into the pre-trained model, and the accuracy evaluation result data of the generated answer data and the corresponding reasoning process data are output, including:

[0012] The second multimodal data is input into the pre-trained model to sequentially perform the following reasoning tasks based on the pre-trained model:

[0013] Analyzing the content of the visual modality data according to the understanding of the problem data to obtain the analysis result of the visual modality data;

[0014] Generate a plurality of candidate answer data corresponding to the question data according to the analysis result of the visual modality data, and judge the correctness of the generated answer data by comparing the candidate answer data with the generated answer data to obtain a correctness judgment result;

[0015] Based on the analysis result of the visual modality data, generating reasoning process data corresponding to the correctness judgment result;

[0016] The accuracy evaluation result data for the generated answer data is generated based on the evaluation standard and the correctness judgment result.

[0017] On the other hand, inputting the second multimodal data into the pre-trained model to sequentially perform the reasoning tasks based on the pre-trained model includes:

[0018] After writing the information of executing the reasoning task in sequence into the evaluation task information, the second multimodal data is input into the pre-trained model to execute the reasoning task in sequence based on the pre-trained model.

[0019] On the other hand, inputting the second multimodal data into the pre-trained model to sequentially perform the reasoning tasks based on the pre-trained model includes:

[0020] Inputting the question data, the visual modality data in the second multimodal data, and the first evaluation task prompt word into the pre-trained model, and outputting the analysis result of the visual modality data; the first evaluation task prompt word is to analyze the content of the visual modality data according to the understanding of the question data, and obtain the analysis result of the visual modality data;

[0021] Inputting the analysis result of the visual modality data and the second evaluation task prompt word into the pre-trained model, and outputting a plurality of the candidate answer data; the second evaluation task prompt word is to generate a plurality of the candidate answer data corresponding to the question data according to the analysis result of the visual modality data;

[0022] Input each of the candidate answer data, the generated answer data and the third evaluation task prompt word into the pre-trained model, and output the correctness judgment result; the third evaluation task prompt word is to judge the correctness of the generated answer data by comparing the candidate answer data with the generated answer data, and obtain the correctness judgment result;

[0023] Inputting the analysis result of the visual modality data and the fourth evaluation task prompt word into the pre-trained model, and outputting the reasoning process data; the fourth evaluation task prompt word is based on the analysis result of the visual modality data, and generates the reasoning process data corresponding to the correctness judgment result;

[0024] The evaluation criteria, the correctness judgment result and the fifth evaluation task prompt word are input into the pre-trained model, and the accuracy evaluation result data is output; the fifth evaluation task prompt word is to generate the accuracy evaluation result data for the generated answer data based on the evaluation criteria and the correctness judgment result.

[0025] On the other hand, the question data, the visual modality data in the second multimodal data, and the first evaluation task prompt word are input into the pre-trained model, and the analysis result of the visual modality data is output, including:

[0026] Inputting the question data, the visual modality data in the second multimodal data, and the first evaluation task prompt word into a first pre-trained model, and outputting an analysis result of the visual modality data;

[0027] Inputting the analysis result of the visual modality data and the second evaluation task prompt word into the pre-trained model, and outputting a plurality of candidate answer data, including:

[0028] Inputting the analysis results of the visual modality data and the second evaluation task prompt words into a second pre-trained model, and outputting a plurality of the candidate answer data;

[0029] Inputting each of the candidate answer data, the generated answer data and the third evaluation task prompt word into the pre-trained model, and outputting the correctness judgment result, including:

[0030] Inputting each of the candidate answer data, the generated answer data and the third evaluation task prompt word into a third pre-trained model, and outputting the correctness judgment result;

[0031] Inputting the analysis result of the visual modality data and the fourth evaluation task prompt word into the pre-training model, and outputting the reasoning process data, including:

[0032] Inputting the analysis results of the visual modality data and the fourth evaluation task prompt words into a fourth pre-training model, and outputting the reasoning process data;

[0033] Inputting the evaluation criteria, the correctness judgment result and the fifth evaluation task prompt word into the pre-training model, and outputting the accuracy evaluation result data, including:

[0034] Input the evaluation criteria, the correctness judgment result and the fifth evaluation task prompt word into a fifth pre-training model, and output the accuracy evaluation result data;

[0035] Among them, the first pre-trained model, the second pre-trained model, the third pre-trained model, the fourth pre-trained model and the fifth pre-trained model are all different pre-trained models pre-trained according to the corresponding reasoning tasks.

[0036] On the other hand, it also includes:

[0037] Obtaining standard answer data corresponding to the question data;

[0038] The correctness of the generated answer data is judged by comparing the candidate answer data with the generated answer data to obtain a correctness judgment result, including:

[0039] The candidate answer data and the generated answer data as well as the standard answer data and the generated answer data are respectively compared to judge the correctness of the generated answer data to obtain the correctness judgment result.

[0040] On the other hand, the evaluation standard is a scoring standard, and the accuracy evaluation result data is a scoring result of the accuracy of the generated answer data.

[0041] On the other hand, the evaluation methods corresponding to the evaluation criteria include:

[0042] According to the probability values ​​of the candidate scores output by the pre-training model, a candidate score with the highest probability value is selected as the accuracy scoring result.

[0043] On the other hand, the evaluation methods corresponding to the evaluation criteria include:

[0044] The accuracy scoring result is calculated based on each candidate score and the probability value of each candidate score output by the pre-training model.

[0045] On the other hand, the accuracy score result is calculated based on each candidate score and the probability value of each candidate score output by the pre-trained model, and is calculated by the following formula:

[0046] ;

[0047] in, Score the accuracy of the results, For the The candidate scores, For the The probability value of the candidate score, is the scoring function, is the total number of candidate scores.

[0048] On the other hand, the pre-trained model includes a visual transformer module, a text vectorization processing module, a multimodal fusion module and a language model;

[0049] The visual transformer module is used to convert the input visual modality data into a visual tensor; the text vectorization processing module is used to convert the input text data into a text tensor; the multimodal fusion module is used to perform modality fusion processing on the visual tensor and the text tensor and output a modality fusion result; the language model is used to obtain the reasoning process data according to the modality fusion result;

[0050] The modal fusion result is input into an evaluation function to obtain the accuracy evaluation result data.

[0051] On the other hand, the pre-trained model is a model pre-trained according to the task objective of the visual question answering task corresponding to the target visual question answering model.

[0052] In order to solve the above technical problems, the present invention further provides an evaluation device for a visual question answering task, comprising:

[0053] Memory for storing computer programs;

[0054] A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the evaluation method of the visual question answering task as described in any one of the above are implemented.

[0055] In order to solve the above technical problems, the present invention also provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the evaluation method of the visual question answering task as described in any one of the above items are implemented.

[0056] In order to solve the above technical problems, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the evaluation method for the visual question answering task as described in any one of the above items.

[0057] The evaluation method for the visual question answering task provided by the present invention has the beneficial effect that before deploying the target visual question answering model of the target visual question answering task, a pre-trained model is used to evaluate the model quality of the target visual question answering model, and first multimodal data including question data and visual modal data are input into the target visual question answering model to obtain generated answer data, and then second multimodal data including generated answer data, question data, evaluation task prompt words and visual modal data are input into the pre-trained model, and the evaluation task prompt words carry the evaluation task information and evaluation criteria for the target visual question answering model, so that the pre-trained model evaluates the accuracy of the generated answer data and gives the reasoning process data, and outputs the intermediate reasoning process by utilizing the semantic understanding ability and reasoning ability of the pre-trained model for complex text, thereby improving the interpretability and reliability of the quality evaluation results of the target visual question answering model, which helps to obtain more accurate model quality evaluation results, and by deploying the target visual question answering model that has been tested for quality on the target device to perform the visual question answering task, the generation effect of the target visual question answering model in the application is guaranteed.

[0058] The present invention also provides an evaluation device for a visual question answering task, a non-volatile storage medium, and a computer program product, which have the above-mentioned beneficial effects and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 A flowchart of a method for evaluating a visual question answering task provided by an embodiment of the present invention;

[0061] Figure 2 A schematic diagram of an evaluation framework of a pre-training model provided in an embodiment of the present invention;

[0062] Figure 3 A schematic diagram of the structure of an evaluation device for a visual question answering task provided by an embodiment of the present invention;

[0063] Figure 4 A schematic diagram of the structure of an evaluation device for a visual question answering task provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] The core of the present invention is to provide an evaluation method, device, medium and computer program product for visual question answering tasks, which are used to improve the accuracy of model quality evaluation results for visual question answering tasks.

[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0066] With the rapid development of algorithms in the field of artificial intelligence and the rapid growth of data scale, technologies such as deep learning have enabled visual question answering models to perform better in dealing with complex problems. Visual question answering technology is an emerging cross-disciplinary research direction in the fields of artificial intelligence and computer vision. It has been widely used in scene understanding, image search, social media, and intelligent customer service, and has extremely high research and application value.

[0067] At present, the model quality evaluation methods of visual question answering models are mainly divided into three categories: the accuracy-based evaluation method, that is, using the test data set to test the similarity between the model output result and the standard result. For example, for the visual question answering task, the model quality of the visual question answering model is determined by testing the similarity between the generated answer text of the visual question answering model and the standard answer. However, this evaluation method has limitations in accuracy measurement and requires precise matching, which may cause misjudgment of the results due to singular and plural, tense, etc. The evaluation method based on semantic similarity tests the similarity between the generated answer text of the visual question answering model and the standard answer from the semantic level to determine the model quality of the visual question answering model, but this method also has certain limitations when evaluating similar words. For example, if the answer to a question is white, and the system predicts that the answer is black, the score should be 0 at this time, but the result calculated based on the semantic similarity may give a very high score, resulting in errors in the evaluation. The manual evaluation method usually requires answers from experts in multiple fields, and a comprehensive evaluation of the generated answer data of the visual question answering model is made based on the answers of multiple experts. It has very high accuracy, but requires a lot of time and resources.

[0068] It can be seen that the traditional method of evaluating the model quality of the visual question answering model is mainly to evaluate through simple numerical calculations, which may result in correct answers that are similar to the standard answers (different tenses, singular and plural cases), but this type of method may result in misjudgment; the method based on semantic similarity can effectively solve the absolute problem of the accuracy method, but there may be situations where the semantic categories are similar but the meanings are different, which will also lead to misjudgment problems, and both methods are not interpretable. The manual evaluation method is the most accurate and reliable method, but manual evaluation consumes a lot of time and manpower.

[0069] In order to improve the accuracy of the model quality evaluation results of the visual question and answering task, an embodiment of the present invention provides an evaluation scheme for the visual question and answering task. Before deploying the target visual question and answering model of the target visual question and answering task, a pre-trained model is used to evaluate the model quality of the target visual question and answering model. First multimodal data including question data and visual modal data is input into the target visual question and answering model to obtain generated answer data. Second multimodal data including generated answer data, question data, evaluation task prompt words and visual modal data is input into the pre-trained model. The evaluation task prompt words carry the evaluation task information and evaluation criteria of the target visual question and answering model, so that the pre-trained model evaluates the accuracy of the generated answer data and gives the reasoning process data. By utilizing the semantic understanding ability and reasoning ability of the pre-trained model for complex text to output the intermediate reasoning process, the interpretability and reliability of the quality evaluation results of the target visual question and answering model are improved, which helps to obtain more accurate model quality evaluation results. By deploying the target visual question and answer model that has been tested for quality on a target device to perform the visual question and answering task, the generation effect of the target visual question and answer model in the application is guaranteed.

[0070] The evaluation method for the visual question answering task provided in the embodiment of the present invention can be implemented by deploying a pre-trained model based on a server or a server cluster. In practical applications, the pre-trained model can be deployed on a cloud server, and after the evaluation of the visual question answering model is completed, the model parameters of the visual question answering model with a qualified quality evaluation result are sent to the target device for deployment.

[0071] Based on the above architecture, the evaluation method for the visual question answering task provided by the embodiment of the present invention is described below with reference to the accompanying drawings.

[0072] Figure 1 A flowchart of a method for evaluating a visual question answering task provided by an embodiment of the present invention; Figure 2 A schematic diagram of an evaluation framework for a pre-training model provided in an embodiment of the present invention.

[0073] like Figure 1As shown, the evaluation method for the visual question answering task provided by an embodiment of the present invention includes: S101: obtaining a pre-trained model, first multimodal data and a target visual question answering model; the first multimodal data includes text modal data and visual modal data, and the text modal data in the first multimodal data is question data.

[0074] S102: Input the first multimodal data into the target visual question-answering model to obtain generated answer data.

[0075] S103: Acquire second multimodal data; the second multimodal data includes textual modal data and visual modal data, the visual modal data in the second multimodal data is the same as the visual modal data in the first multimodal data, the textual modal data in the second multimodal data includes the question data, generated answer data and evaluation task prompt words in the first multimodal data, and the evaluation task prompt words include evaluation task information and evaluation criteria for the target visual question answering model.

[0076] S104: Input the second multimodal data into the pre-training model, and output accuracy evaluation result data of the generated answer data and corresponding reasoning process data.

[0077] S105: Obtain a quality evaluation result of the target visual question answering model based on the accuracy evaluation result data and the reasoning process data. If the quality evaluation result is qualified, deploy the target visual question answering model on the target device to perform the visual question answering task using the target visual question answering model.

[0078] It should be noted that the target visual question-answering model in the embodiment of the present invention can be an image question-answering model or a video question-answering model. The image question-answering model is used to input an image and a question text, which is usually related to the input image, and the image question-answering model outputs an answer text corresponding to the question text. The video question-answering model is used to input a video and a question text, which is usually related to the input video, and the image question-answering model outputs an answer text corresponding to the question text. The video can be represented by a group of video frames (images) carrying a timestamp. The target device refers to a device on which the target visual question-answering model needs to be deployed. In practical applications, it can be an edge device, such as a user terminal (mobile phone, personal computer). For the convenience of explanation, in the embodiment of the present invention, image data and video data are collectively referred to as visual modality data.

[0079] In a specific implementation, for S101, a pre-trained model and relevant program modules of the evaluation method for the visual question answering task provided by the embodiment of the present invention may be deployed based on a cloud server.

[0080] In an embodiment of the present invention, the pre-trained model used may be a pre-trained model for a general field, or the pre-trained model may be pre-trained to improve the accuracy of the quality evaluation result. The pre-trained model may be a model pre-trained according to the task objective of the visual question-answering task corresponding to the target visual question-answering model. For example, if the target visual question-answering model is a visual question-answering model for weather questions, the pre-trained model may be pre-trained using weather training data so that the pre-trained model acquires knowledge in the specialized field of weather.

[0081] like Figure 2 As shown, in an embodiment of the present invention, the pre-trained model can be composed of a vision transformer (ViT) module, a text vectorization processing (Embedding) module, a multimodal fusion module and a language model; wherein the vision transformer module is used to convert the input visual modality data into a visual tensor; the text vectorization processing module is used to convert the input text data into a text tensor; the multimodal fusion module is used to perform modal fusion processing on the visual tensor and the text tensor, and output the modal fusion result; the language model is used to obtain the reasoning process data according to the modal fusion result; the modal fusion result is input into the evaluation function to obtain the accuracy evaluation result data. Among them, the vision transformer module can adopt the pre-trained ViT-bigG-14 model, and the language model can adopt the large language model (Large Language Model, LLM).

[0082] In the embodiment of the present invention, a tensor is a multidimensional array used to represent data and is a basic data unit in a neural network.

[0083] The first multimodal data obtained may be derived from a test data set for a target visual question-answering model, wherein a test sample may include visual modality data, question data, and standard answer data, wherein the visual modality data is a visual modality, the question data is textual modality data, and the standard answer data is a reference answer to the question data. Only visual modality data and question data are required in the first multimodal data.

[0084] For S102, the first multimodal data is input into the target visual question-answering model to obtain generated answer data. For example, the first multimodal data may include an image and question data of "What is the weather like in the picture?", and the generated answer data output by the target visual question-answering model may be "cloudy".

[0085] For S103, the generated answer data output by the target visual question answering model is used to construct the second multimodal data. The second multimodal data may adopt the following data structure: <bos> PROMPT QUESTION ANSWER <sep>SCORE RATIONALE <eod>”. Among them, <> represents special characters, which enables the pre-trained model to better understand the semantic information of the input data. <bos>Indicates the start of data. Represents an image, <sep>is the separator between task questions and answers. <eod>Indicates the end of the data. In addition, PROMPT represents the prompt words related to the evaluation task, QUESTION and ANSWER represent the questions and answers of the visual question answering, and SCORE RATIONALE represents the accuracy evaluation result data output by the pre-trained model and the corresponding reasoning process data.

[0086] In an embodiment of the present invention, in order to achieve the interpretability of the quality evaluation results of the target visual question-answering model, the pre-trained model generates reasoning process data while generating accuracy evaluation result data. To this end, the evaluation task prompt words can be designed as follows: (1) Evaluation task information: You will get a visual modality data (image or video) and question data and generated answer data about the visual modality data. Your task is to score the generated answer data as an expert. Please be sure to read and understand these instructions carefully. (2) Evaluation criteria: Please evaluate the accuracy of the generated answer data and give the reasoning process of the evaluation. For example, give an accuracy score based on 1 to 10 levels, where 1 is the lowest and 10 is the highest.

[0087] For S104, the second multimodal data is input into the pre-trained model, so that the pre-trained model outputs the accuracy evaluation result data of the generated answer data and the corresponding reasoning process data. For example, the pre-trained model outputs the accuracy evaluation result data of the generated answer data as 7.12 points on a 10-point scale, and the output reasoning process data is "the generated answer data 'cloudy' is similar in meaning to the cloudy weather in the image, and the calculated score is 7.12".

[0088] On the basis of the above embodiments, in order to further improve the interpretability of the evaluation results given by the pre-trained model, an embodiment of the present invention provides a model evaluation solution based on thought chain.

[0089] In an embodiment of the present invention, in S104, the second multimodal data is input into the pre-trained model, and the accuracy evaluation result data of the generated answer data and the corresponding reasoning process data are output, which may include: inputting the second multimodal data into the pre-trained model to perform the following reasoning tasks in sequence based on the pre-trained model: analyzing the content of the visual modality data according to the understanding of the question data to obtain the analysis result of the visual modality data; generating multiple alternative answer data corresponding to the question data according to the analysis result of the visual modality data, and judging the correctness of the generated answer data by comparing the alternative answer data with the generated answer data to obtain the correctness judgment result; generating reasoning process data corresponding to the correctness judgment result based on the analysis result of the visual modality data; generating accuracy evaluation result data for the generated answer data according to the evaluation criteria and the correctness judgment result.

[0090] Thought chains are a series of intermediate representations generated by the pre-trained model during the text generation process. Thought chains can provide more contextual understanding for evaluating the generated text, while also helping to explain the evaluation process and results.

[0091] In some optional implementations of the embodiments of the present invention, inputting the second multimodal data into the pre-trained model to sequentially perform the reasoning task based on the pre-trained model may include: after writing the information of sequentially performing the reasoning task into the evaluation task information, inputting the second multimodal data into the pre-trained model to sequentially perform the reasoning task based on the pre-trained model. That is, the evaluation task prompt words can be generated in the form of a thought chain based on the above-mentioned reasoning task, and the evaluation task prompt words are input into the pre-trained model at one time so that the pre-trained model generates the accuracy evaluation result data of the generated answer data and the corresponding reasoning process data according to the logic of the thought chain.

[0092] In some other optional implementations of the embodiments of the present invention, in order to further improve the interpretability of the evaluation results given by the pre-trained model, the second multimodal data is input into the pre-trained model to perform reasoning tasks in sequence based on the pre-trained model, and it can also include: inputting the question data, the visual modal data in the second multimodal data and the first evaluation task prompt word into the pre-trained model, and outputting the analysis result of the visual modal data; the first evaluation task prompt word is to analyze the content of the visual modal data according to the understanding of the question data to obtain the analysis result of the visual modal data; the analysis result of the visual modal data and the second evaluation task prompt word are input into the pre-trained model, and a plurality of alternative answer data are output; the second evaluation task prompt word is to generate a plurality of alternative answer data corresponding to the question data according to the analysis result of the visual modal data; Each candidate answer data, generated answer data and the third evaluation task prompt word are input into the pre-training model, and the correctness judgment result is output; the third evaluation task prompt word is to judge the correctness of the generated answer data by comparing the candidate answer data and the generated answer data, and obtain the correctness judgment result; the analysis result of the visual modality data and the fourth evaluation task prompt word are input into the pre-training model, and the reasoning process data is output; the fourth evaluation task prompt word is to generate the reasoning process data corresponding to the correctness judgment result based on the analysis result of the visual modality data; the evaluation standard, the correctness judgment result and the fifth evaluation task prompt word are input into the pre-training model, and the accuracy evaluation result data is output; the fifth evaluation task prompt word is to generate the accuracy evaluation result data of the generated answer data according to the evaluation standard and the correctness judgment result. That is to say, according to the thinking chain provided by the embodiment of the present invention, the reasoning tasks of the pre-training model can be divided and executed multiple times to strengthen the interpretability of each intermediate reasoning link of the pre-training model from the initial second multimodal data to the final generation of the accuracy evaluation result data of the generated answer data and the corresponding reasoning process data.

[0093] In order to improve the accuracy of the intermediate reasoning results of the pre-trained model, in some optional implementations of the embodiments of the present invention, the question data, the visual modality data in the second multimodal data, and the first evaluation task prompt word are input into the pre-trained model, and the analysis result of the visual modality data is output, which may include: the question data, the visual modality data in the second multimodal data, and the first evaluation task prompt word are input into the first pre-trained model, and the analysis result of the visual modality data is output. The analysis result of the visual modality data and the second evaluation task prompt word are input into the pre-trained model, and a plurality of candidate answer data are output, which may include: the analysis result of the visual modality data and the second evaluation task prompt word are input into the second pre-trained model, and a plurality of candidate answer data are output. Each candidate answer data, the generated answer data, and the third evaluation task prompt word are input into the pre-trained model, and the correctness judgment result is output, which may include: each candidate answer data, the generated answer data, and the third evaluation task prompt word are input into the third pre-trained model, and the correctness judgment result is output. Inputting the analysis results of the visual modality data and the fourth evaluation task prompt words into the pre-trained model, and outputting the reasoning process data, may include: inputting the analysis results of the visual modality data and the fourth evaluation task prompt words into the fourth pre-trained model, and outputting the reasoning process data. Inputting the evaluation criteria, the correctness judgment results, and the fifth evaluation task prompt words into the pre-trained model, and outputting the accuracy evaluation result data, may include: inputting the evaluation criteria, the correctness judgment results, and the fifth evaluation task prompt words into the fifth pre-trained model, and outputting the accuracy evaluation result data. Among them, the first pre-trained model, the second pre-trained model, the third pre-trained model, the fourth pre-trained model, and the fifth pre-trained model are all different pre-trained models pre-trained according to the corresponding reasoning tasks. That is to say, the corresponding training data set can be used in advance for each reasoning task to perform targeted model training on the pre-trained model used, thereby reducing the loss when the pre-trained model is called multiple times to generate intermediate results.

[0094] In the evaluation method for the visual question answering task provided in the embodiment of the present invention, the first multimodal data and the second multimodal data may not need to include standard answer data. In other optional implementations of the embodiment of the present invention, standard answer data may also be added as one of the evaluation bases for the pre-trained model.

[0095] The evaluation method for the visual question answering task provided by the embodiment of the present invention may further include: obtaining standard answer data corresponding to the question data. In the above embodiment, by comparing the candidate answer data with the generated answer data, judging the correctness of the generated answer data, and obtaining the correctness judgment result, it may include: respectively comparing the candidate answer data with the generated answer data and the standard answer data with the generated answer data, judging the correctness of the generated answer data, and obtaining the correctness judgment result.

[0096] In an embodiment of the present invention, semantic expansion can also be performed based on the standard answer data to obtain richer alternative answer data. That is to say, the alternative answer data and the generated answer data, as well as the standard answer data and the generated answer data, are compared respectively, and the correctness of the generated answer data is judged to obtain a correctness judgment result, which may include: generating multiple first alternative answer data corresponding to the question data based on the analysis results of the visual modality data according to the pre-trained model; performing data expansion based on the standard answer data based on the pre-trained model to generate multiple similar second alternative answer data; respectively comparing the first alternative answer data and the generated answer data, as well as the second alternative answer data and the generated answer data, to judge the correctness of the generated answer data, and obtain a correctness judgment result. By performing similar expansion on the standard answer data and combining the alternative answer data to evaluate the accuracy of the generated answer data, the pre-trained model has more knowledge basis to give a more accurate evaluation of the accuracy of the generated answer data.

[0097] On the basis of the above-mentioned embodiment, in the embodiment of the present invention, the evaluation standard may be a scoring standard, and the accuracy evaluation result data may be a scoring result of the accuracy of the generated answer data.

[0098] In some optional implementations of the embodiments of the present invention, the evaluation method corresponding to the evaluation criteria may include: according to the probability values ​​of each candidate score output by the pre-trained model, selecting a candidate score with the highest probability value as the accuracy scoring result. That is to say, the pre-trained model can be set to score the accuracy of the generated answer data in a classified manner, and the obtained accuracy evaluation result data is the accuracy scoring result of the generated answer data. The result output by the pre-trained model is the probability value of multiple candidate scores. The probability value of each candidate score is input into the scoring function, and the score with the highest probability value, that is, the most likely score, can be obtained as the accuracy scoring result of the generated answer data.

[0099] In some other optional embodiments of the present invention, the evaluation method corresponding to the evaluation criteria may also include: calculating the accuracy score result according to each candidate score and the probability value of each candidate score output by the pre-training model.

[0100] In order to obtain a more fine-grained accuracy scoring result, a regression scoring method is adopted in the embodiment of the present invention, that is, a more detailed score is obtained according to each candidate score and the probability value of each candidate score output by the pre-trained model. That is, as listed in the above embodiment of the present invention, if the classification calculation method is adopted, the output accuracy scoring result may be 7 or 8 points, but if the regression calculation method is adopted, the output accuracy scoring result is 7.12, which can more accurately quantify the accuracy of the generated answer data.

[0101] In the regression calculation method, the accuracy score result is calculated according to the probability value of each candidate score and the output of the pre-trained model, which can be calculated by the following formula: .in, Score the results for accuracy, For the Candidate scores, For the The probability value of the candidate score, is the scoring function, is the total number of candidate scores. That is to say, the accuracy score result can be obtained by weighted summing all candidate scores, and the weight is the probability value.

[0102] In some other optional implementations of the embodiments of the present invention, other regression calculation methods may also be used, such as eliminating one or more candidate scores with the smallest probability values ​​and then calculating the accuracy score result based on the remaining candidate scores.

[0103] Based on the above embodiments, Figure 2 The model architecture shown in the embodiment of the present invention provides an evaluation method for visual question answering tasks suitable for application.

[0104] In the embodiment of the present invention, by formalizing the visual modality data, question data, generated answer data and evaluation task prompt words into the same structure, the " <bos> PROMPTQUESTION ANSWER <sep>SCORE RATIONALE <eod>"The second multimodal data of the structure.

[0105] Based on Figure 2 The evaluation framework of the pre-trained model shown in the figure first encodes the visual modality data and the text modality data. For the text modality data, the pre-trained model encodes the text modality data through the text vectorization processing module to obtain the text encoding ,Right now: .

[0106] For visual modality data, the model transforms the visual modality data through the visual transformer module. Perform feature extraction to obtain visual features ,Right now: In an embodiment of the present invention, the visual transformer module may use a pre-trained ViT-bigG-14 model.

[0107] Encode the text and visual features Input into the pre-trained model to get the candidate The probability distribution of and reasoning analysis text ,Right now: .

[0108] Reasoning analysis text obtained through pre-trained model It can be directly used as the output of the model, that is, the inference process data. Finally, the probability distribution of the score After weighted summation through the scoring function, the final score is obtained: .

[0109] Finally, the pre-trained model is scored by the accuracy of the generated answer quantified Evaluate the target visual question answering model used in the target visual question answering task and analyze the text through reasoning Explain the reviews to ensure their accuracy while providing interpretability analysis to improve their reliability.

[0110] The above describes in detail various embodiments corresponding to the evaluation method for the visual question answering task. On this basis, the present invention also discloses an evaluation device, equipment, non-volatile storage medium and computer program product for the visual question answering task corresponding to the above method.

[0111] Figure 3 A schematic diagram of the structure of an evaluation device for a visual question answering task provided by an embodiment of the present invention.

[0112] like Figure 3 As shown, the evaluation device for the visual question answering task provided by the embodiment of the present invention includes: a first acquisition unit 301, used to acquire a pre-trained model, first multimodal data and a target visual question answering model; the first multimodal data includes text modal data and visual modal data, and the text modal data in the first multimodal data is question data.

[0113] The generating unit 302 is used to input the first multimodal data into the target visual question answering model to obtain generated answer data.

[0114] The second acquisition unit 303 is used to acquire second multimodal data; the second multimodal data includes textual modal data and visual modal data, the visual modal data in the second multimodal data is the same as the visual modal data in the first multimodal data, the textual modal data in the second multimodal data includes the question data, generated answer data and evaluation task prompt words in the first multimodal data, and the evaluation task prompt words include evaluation task information and evaluation criteria for the target visual question answering model.

[0115] The first evaluation unit 304 is used to input the second multimodal data into the pre-training model, and output accuracy evaluation result data of the generated answer data and corresponding reasoning process data.

[0116] The second evaluation unit 305 is used to obtain a quality evaluation result of the target visual question answering model based on the accuracy evaluation result data and the reasoning process data. If the quality evaluation result is qualified, the target visual question answering model is deployed on the target device to perform the visual question answering task using the target visual question answering model.

[0117] It should be noted that in each implementation of the evaluation device for the visual question-answering task provided in the embodiment of the present invention, the division of units is only a logical functional division, and other division methods may be used. The connection method between different units may be electrical, mechanical or other connection methods. Separated units may be located in the same physical location or distributed on multiple network nodes. Each unit may be implemented in the form of hardware or in the form of a software functional unit. That is, part or all of the units provided in the embodiment of the present invention may be selected according to actual needs and the corresponding connection method or integration method may be adopted to achieve the purpose of the embodiment of the present invention.

[0118] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0119] Figure 4 A schematic diagram of the structure of an evaluation device for a visual question answering task provided by an embodiment of the present invention.

[0120] like Figure 4 As shown, the evaluation device for the visual question answering task provided by the embodiment of the present invention includes:

[0121] The memory 410 is used to store a computer program 411 .

[0122] The processor 420 is used to execute the computer program 411. When the computer program 411 is executed by the processor 420, the steps of the evaluation method for the visual question answering task provided in any one of the above embodiments are implemented.

[0123] Among them, the processor 420 may include one or more processing cores, such as a 3-core processor, an 8-core processor, etc. The processor 420 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 420 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 420 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 420 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0124] The memory 410 may include one or more non-volatile storage media, which may be non-transitory. The memory 410 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 410 is at least used to store the following computer program 411, wherein the computer program 411, after being loaded and executed by the processor 420, can implement the relevant steps in the evaluation method of the visual question answering task disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 410 may also include an operating system 412 and data 413, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 412 may be Windows or other types of operating systems. Data 413 may include, but is not limited to, the data involved in the above method.

[0125] In some embodiments, the evaluation device for the visual question answering task may further include a display screen 430 , a power supply 440 , a communication interface 450 , an input / output interface 460 , a sensor 470 , and a communication bus 480 .

[0126] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the evaluation device for the visual question answering task, and may include more or fewer components than those shown in the figure.

[0127] An evaluation device for a visual question answering task provided in an embodiment of the present invention includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the steps of the evaluation method for a visual question answering task provided in the above embodiment, and the effect is the same as above.

[0128] An embodiment of the present invention provides a non-volatile storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for evaluating a visual question answering task provided in any one of the above embodiments can be implemented.

[0129] The non-volatile storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0130] For an introduction to the non-volatile storage medium provided in an embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the evaluation method for the visual question answering task provided in an embodiment of the present invention, and the present invention will not elaborate on it here.

[0131] An embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the evaluation method for the visual question answering task provided in any one of the above embodiments.

[0132] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the above-mentioned method embodiment, and the effect thereof is the same as the evaluation method for the visual question answering task provided by the embodiment of the present invention, and the present invention will not elaborate on it here.

[0133] The above is a detailed introduction to the evaluation method, device, medium and computer program product for the visual question answering task provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the devices, equipment, non-volatile storage media and computer program products disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0134] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.< / eod> < / sep> < / bos> < / eod> < / sep> < / bos> < / eod> < / sep> < / bos>

Claims

1. An evaluation method for visual question answering tasks, It is characterized in that include: Obtain a pre-trained model, first multimodal data, and a target visual question answering model; The first multimodal data includes text modal data and visual modal data, and the text modal data in the first multimodal data is question data; Inputting the first multimodal data into the target visual question answering model to generate answer data; Acquire second multimodal data; the second multimodal data includes text modal data and visual modal data, the visual modal data in the second multimodal data is the same as the visual modal data in the first multimodal data, the text modal data in the second multimodal data includes the question data in the first multimodal data, the generated answer data and the evaluation task prompt words, and the evaluation task prompt words include the evaluation task information and evaluation criteria for the target visual question answering model; Inputting the second multimodal data into the pre-trained model, and outputting accuracy evaluation result data of the generated answer data and corresponding reasoning process data; Obtaining a quality evaluation result of the target visual question answering model according to the accuracy evaluation result data and the reasoning process data, and if the quality evaluation result is qualified, deploying the target visual question answering model on a target device to perform a visual question answering task using the target visual question answering model; Wherein, inputting the second multimodal data into the pre-trained model, and outputting the accuracy evaluation result data of the generated answer data and the corresponding reasoning process data, comprises: inputting the second multimodal data into the pre-trained model, so as to perform the following reasoning tasks in sequence based on the pre-trained model: analyzing the content of the visual modality data according to the understanding of the question data, and obtaining the analysis result of the visual modality data; generating a plurality of alternative answer data corresponding to the question data according to the analysis result of the visual modality data, and judging the correctness of the generated answer data by comparing the alternative answer data with the generated answer data, and obtaining the correctness judgment result; generating the reasoning process data corresponding to the correctness judgment result based on the analysis result of the visual modality data; generating the accuracy evaluation result data of the generated answer data according to the evaluation criteria and the correctness judgment result; The step of inputting the second multimodal data into the pre-trained model to sequentially perform the reasoning tasks based on the pre-trained model includes: Inputting the question data, the visual modality data in the second multimodal data, and the first evaluation task prompt word into the pre-trained model, and outputting the analysis result of the visual modality data; the first evaluation task prompt word is to analyze the content of the visual modality data according to the understanding of the question data, and obtain the analysis result of the visual modality data; Inputting the analysis result of the visual modality data and the second evaluation task prompt word into the pre-trained model, and outputting a plurality of the candidate answer data; the second evaluation task prompt word is to generate a plurality of the candidate answer data corresponding to the question data according to the analysis result of the visual modality data; Input each of the candidate answer data, the generated answer data and the third evaluation task prompt word into the pre-trained model, and output the correctness judgment result; the third evaluation task prompt word is to judge the correctness of the generated answer data by comparing the candidate answer data with the generated answer data, and obtain the correctness judgment result; Inputting the analysis result of the visual modality data and the fourth evaluation task prompt word into the pre-trained model, and outputting the reasoning process data; the fourth evaluation task prompt word is based on the analysis result of the visual modality data, and generates the reasoning process data corresponding to the correctness judgment result; The evaluation criteria, the correctness judgment result and the fifth evaluation task prompt word are input into the pre-trained model, and the accuracy evaluation result data is output; the fifth evaluation task prompt word is to generate the accuracy evaluation result data of the generated answer data according to the evaluation criteria and the correctness judgment result; The pre-trained model includes a visual transformer module, a text vectorization processing module, a multimodal fusion module and a language model; The visual transformer module is used to convert the input visual modality data into a visual tensor; the text vectorization processing module is used to convert the input text data into a text tensor; the multimodal fusion module is used to perform modality fusion processing on the visual tensor and the text tensor, and output a modality fusion result; the language model is used to obtain the reasoning process data according to the modality fusion result; The modal fusion result is input into an evaluation function to obtain the accuracy evaluation result data.

2. The method for evaluating a visual question answering task according to claim 1, It is characterized in that Inputting the question data, the visual modality data in the second multimodal data, and the first evaluation task prompt word into the pre-trained model, and outputting the analysis result of the visual modality data, including: Inputting the question data, the visual modality data in the second multimodal data, and the first evaluation task prompt word into a first pre-trained model, and outputting an analysis result of the visual modality data; Inputting the analysis result of the visual modality data and the second evaluation task prompt word into the pre-trained model, and outputting a plurality of candidate answer data, including: Inputting the analysis results of the visual modality data and the second evaluation task prompt words into a second pre-trained model, and outputting a plurality of the candidate answer data; Inputting each of the candidate answer data, the generated answer data and the third evaluation task prompt word into the pre-trained model, and outputting the correctness judgment result, including: Inputting each of the candidate answer data, the generated answer data and the third evaluation task prompt word into a third pre-trained model, and outputting the correctness judgment result; Inputting the analysis result of the visual modality data and the fourth evaluation task prompt word into the pre-training model, and outputting the reasoning process data, including: Inputting the analysis results of the visual modality data and the fourth evaluation task prompt words into a fourth pre-training model, and outputting the reasoning process data; Inputting the evaluation criteria, the correctness judgment result and the fifth evaluation task prompt word into the pre-training model, and outputting the accuracy evaluation result data, including: Input the evaluation criteria, the correctness judgment result and the fifth evaluation task prompt word into a fifth pre-training model, and output the accuracy evaluation result data; Among them, the first pre-trained model, the second pre-trained model, the third pre-trained model, the fourth pre-trained model and the fifth pre-trained model are all different pre-trained models pre-trained according to the corresponding reasoning tasks.

3. The method for evaluating a visual question answering task according to claim 1, It is characterized in that Also includes: Obtaining standard answer data corresponding to the question data; The correctness of the generated answer data is judged by comparing the candidate answer data with the generated answer data to obtain a correctness judgment result, including: The candidate answer data and the generated answer data as well as the standard answer data and the generated answer data are respectively compared to judge the correctness of the generated answer data to obtain the correctness judgment result.

4. The method for evaluating a visual question answering task according to claim 1, It is characterized in that The evaluation standard is a scoring standard, and the accuracy evaluation result data is a scoring result of the accuracy of the generated answer data.

5. The method for evaluating a visual question answering task according to claim 4, It is characterized in that The evaluation methods corresponding to the evaluation criteria include: According to the probability values ​​of the candidate scores output by the pre-training model, a candidate score with the highest probability value is selected as the accuracy scoring result.

6. The method for evaluating a visual question answering task according to claim 4, It is characterized in that The evaluation methods corresponding to the evaluation criteria include: The accuracy scoring result is calculated based on each candidate score and the probability value of each candidate score output by the pre-training model.

7. The method for evaluating a visual question answering task according to claim 6, It is characterized in that The accuracy score result is calculated based on each candidate score and the probability value of each candidate score output by the pre-training model, and is calculated by the following formula: ; in, Scoring the accuracy results, For the The candidate scores, For the The probability value of the candidate score, is the scoring function, is the total number of candidate scores.

8. The method for evaluating a visual question answering task according to claim 1, It is characterized in that The pre-trained model is a model pre-trained according to the task objective of the visual question answering task corresponding to the target visual question answering model.

9. An evaluation device for visual question answering tasks, It is characterized in that include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the evaluation method of the visual question answering task as described in any one of claims 1 to 8 are implemented.

10. A non-volatile storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the evaluation method for the visual question answering task as claimed in any one of claims 1 to 8 are implemented.

11. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the evaluation method for the visual question answering task as claimed in any one of claims 1 to 8 are implemented.