A multi-modal reasoning method for visual question answering
By explicitly aligning text and vision through a multi-dimensional scoring strategy involving initial inference, perception patch selection, and feature injection modules, and combining this with the self-correction of the secondary refinement inference module, the transparency and efficiency issues in multimodal reasoning for visual question answering are resolved, improving the inference accuracy and computational efficiency in complex scenarios.
Patent Information
- Application Number
- CN202611436723.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2046-09-16
AI Technical Summary
Existing visual question answering multimodal reasoning methods suffer from a lack of transparency in the reasoning process, insufficient visual evidence support, and low computational efficiency in complex scenarios. In particular, they are difficult to correct initial perceptual biases and have high memory consumption in long-chain reasoning.
The initial inference module performs preliminary analysis, the perception patch selection module performs key region mining, the feature injection module performs visual feature correction, and the secondary refinement inference module performs self-correction. The text and visuals are explicitly aligned through multi-dimensional scoring strategies such as semantic similarity, gradient significance, and positional bias. The forward hook mechanism is used for feature fusion and self-correction.
It achieves explicit fine-grained alignment between text and vision, improves reasoning accuracy and computational efficiency, provides pixel-level interpretability, solves the visual illusion problem, and supports highly reliable artificial intelligence applications.
Smart Images

Figure CN122946525B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and computer vision technology, and more specifically, to a multimodal reasoning method for visual question answering. Background Technology
[0002] Visual Question Answering (VQA) is a core task in the field of artificial intelligence that connects computer vision (CV) and natural language processing (NLP). Through VQA, a model's ability to perform logical reasoning based on understanding multimodal information can be evaluated. With the development of deep learning technology, especially the emergence of large vision-language models (LVLMs) based on the Transformer architecture, these models have achieved excellent performance in handling routine and intuitive image description tasks. To adapt to scenarios involving complex logical judgments or multi-step inferences, existing technologies introduce the successful chain-of-thought (CoT) paradigm from large language models into the multimodal domain. By explicitly generating intermediate reasoning steps, the model is guided to progressively break down the question, thereby deriving the final answer.
[0003] In existing technologies, the Multimodal CoT method faces insurmountable technical bottlenecks in complex application scenarios, mainly in the following three aspects: 1) The inference chain generated by traditional CoT methods relies on the textual prior knowledge of the language model. However, textual prior knowledge usually lacks clear visual evidence support. Users cannot verify which part of the image each step of the inference generated by the model is based on, resulting in a lack of transparency and interpretability in the inference process. For example, non-existent objects may be generated during the inference process, or the spatial relationship between objects may be incorrectly inferred, leading to an incorrect final answer. 2) Existing mainstream models usually adopt a one-time encoding strategy, that is, visual features are extracted and frozen before inference begins. When the model focuses on the wrong image region in the initial inference step (e.g., mistaking the background for a foreground object), subsequent inference steps often use the misled information as a premise to continue iterating. This cascading propagation makes it difficult for the model to correct the initial perceptual bias in long chain inference. 3) In order to enhance visual perception, some existing technologies (such as ICOT) attempt to introduce visual information during the inference process. However, the mainstream approach is to use the "Token concatenation" method, that is, to retrieve relevant image blocks and concatenate them directly into the text input as additional token sequences. This method causes the length of the input sequence to increase linearly or even exponentially with the increase of the number of inference steps, which greatly increases the memory usage and inference latency. It is also easy to exceed the context window limit of large language models, making it difficult to meet the efficiency requirements of large-scale practical applications.
[0004] Therefore, a technical solution for multimodal reasoning in visual question answering is needed to improve reasoning accuracy and optimize computational efficiency. Summary of the Invention
[0005] To achieve the above objectives, this application provides a multimodal reasoning method for visual question answering, comprising the following steps: Get the original image and the problem ; Load the multimodal inference model and use the original image and the problem Input the multimodal reasoning model to obtain the final reasoning result; the multimodal reasoning includes an initial reasoning module, a perception patch selection module, a feature injection module, and a secondary refinement reasoning module; The initial inference module is based on the original image. and the problem Preliminary analysis was performed to obtain the original visual features. Based on text features, output text sequence ; The perception patch selection module selects the step text sequence. Perform key region mining and output a mapping set between each reasoning step and its key visual evidence. ; The feature injection module uses the mapping set As input, the original visual features Make corrections to obtain enhanced visual features. This enables the reshaping of the feature space. The secondary refinement reasoning module applies the enhanced visual features. It performs self-correction and generates the final reasoning result.
[0006] The initial inference module includes a text encoder, a visual encoder, and an inference unit. The visual encoder processes the original image. Encode to obtain two-dimensional visual feature maps The original visual features are obtained through spatial unfolding. The two-dimensional visual feature map Represented as: ,in, , These are the height and width of the feature map, respectively. For feature channel dimensions; The text encoder is used to extract questions Extract text features; The inference unit outputs a step text sequence containing n logical steps. , represented as ,in, This represents the sequence number of the reasoning step.
[0007] The key area mining includes the following steps: From two-dimensional visual feature maps Obtain visual patch vectors From the reasoning steps text vector Calculate semantic similarity score ; Through reasoning steps Calculate gradient significance score ; From the current step Extract directional keywords from the text and calculate the positional offset. ; Perform window compensation and calculate the window consistency score. ; Calculate the overall score The calculation formula is: ; Based on the comprehensive score Sort all image patches in descending order and select the highest-scoring ones. The patch is the first one. One reasoning step Key visual evidence set .
[0008] Furthermore, obtain the visual patch vector. At that time, the two-dimensional visual feature map Expanded by spatial location, each spatial location ( The D-dimensional feature vector at position () is a visual patch vector. ,in These are the specific height and width, and The two-dimensional visual feature map CCP One visual patch vector; Get text vector At that time, the reasoning steps The text is encoded through the embedding layer of a large language model, and the encoded sequence-level representation is taken as the text vector. ,and .
[0009] Calculate semantic similarity score At that time, calculate each visual patch vector. With text vectors The cosine similarity between them, for all visual patch vectors The similarity scores are Z-score normalized and mapped to the [0,1] interval using the Sigmoid activation function, as follows: ,in, (.) is the cosine similarity function.
[0010] Calculate gradient significance score Includes the following steps: Define the reasoning steps The autoregressive generation loss is expressed as: ,in, For the first Autoregressive negative log-likelihood loss for each inference step; The text sequence for the i-th reasoning step; This represents the total number of terms contained in the text sequence. For the current number In the first reasoning step One word element to be generated, This is the sequence number of the lexical element in the current reasoning step; The sequence of words generated before the j-th word in the current inference step; I is the input image, and Q is the input question. P represents the reasoning steps that have been generated before the current step, and P is the conditional probability of generating the target word under the above conditions.
[0011] Will The output two-dimensional visual feature map is backpropagated to the visual encoder via an automatic differentiation mechanism. At this point, the loss is calculated for each spatial location ( The gradient of the visual feature at point () is calculated, and the L2 norm of the gradient is taken as the significance score of the patch. Calculate position offset Includes the following steps: From the reasoning steps using a natural language parser Location keywords are extracted from the text and mapped to spatial attention masks. When mapping to spatial attention masks, the image feature map is spatially divided into 3×3 grid regions according to a predefined location-region mapping table, and spatial weights are assigned to the regions where keywords are matched. .
[0012] Calculate window consistency score Includes the following steps: For visual patch vectors With text vectors Perform L2 normalization, set the window size, and construct a local window; For any window size Calculate the mean of the normalized visual patch vectors within the window and the window semantic similarity between the mean and the normalized text vectors; The semantic similarity of each local window is uniformly fed back to each visual patch within that local window; for any visual patch The contribution of all overlapping windows containing the visual patch at each window scale is summed to obtain the window accumulation amount; After normalizing the window cumulative values of all visual patches to their maximum values, a multiplicative window consistency score centered at 1 is constructed. .
[0013] The process of reshaping the feature space includes the following steps: Calculate raw visual features With key visual evidence The distribution of interactive attention between them is represented as: Where t is the inference step number, and the superscript T indicates the matrix transpose operation. The matrix is obtained by expanding the original visual features according to their spatial locations. For the first The inference steps select the key visual patches and arrange them in rows to obtain the feature matrix; Define adaptive gating parameters The weighted key features are fused back into the original feature space to form enhanced visual features. , represented as: .
[0014] Furthermore, self-correction refers to: enhancing the visual features Input a visual encoder, output an enhanced text sequence ; By constructing and refining prompt words through prompt word engineering, a large language model is guided to compare text sequences. With enhanced text sequence Identify and correct potential perceptual biases.
[0015] According to the present invention, explicit fine-grained alignment of text and vision can be achieved, solving the "black box" problem; adaptive feature enhancement is achieved without increasing sequence length, significantly improving computational efficiency; and self-correction is performed on the corrected features; the accuracy of reasoning in complex scenarios is improved, visual illusions are effectively suppressed, and pixel-level interpretability is provided, providing technical support for highly reliable artificial intelligence applications. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the steps of a multimodal reasoning method for visual question answering provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a multimodal reasoning process provided according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the feature injection module provided according to an embodiment of the present invention. Detailed Implementation
[0017] The specific implementation of the present invention will now be described in detail with reference to the accompanying drawings.
[0018] like Figure 1 As shown, the multimodal reasoning method for visual question answering provided by this invention includes the following steps: Step S100: Obtain the original image and the problem ; This invention provides specific examples, such as Figure 2 As shown: Original image Photos of the shelving area, question The question asks for "how many bottles of Fanta are filled".
[0019] Step S110: Load the multimodal inference model and transfer the original image. and the problem Input the multimodal reasoning model to obtain the final reasoning result; The multimodal inference model includes an initial inference module, a perception patch selection module, a feature injection module, and a secondary refinement inference module; In this invention, the intermediate processing steps for the multimodal inference model to acquire input data and output the final inference result include the following steps: Step S111: The initial inference module bases the initial inference on the original image. and the problem The initial analysis outputs an intermediate reasoning file containing logical steps, i.e., a sequence of step texts. ; Specifically, the initial inference module includes a text encoder, a visual encoder, and an inference unit; 1) The visual encoder on the original image Encode to obtain raw visual features ; First, a visual encoder (such as CLIP-ViT) takes the input image... Encoding as a two-dimensional visual feature map , represented as ,in, , These are the height and width of the feature map, respectively. For feature channels; two-dimensional visual feature map The original visual features are obtained through spatial unfolding. This provides a visual feature base for selecting patches in subsequent steps.
[0020] 2) A text encoder is used to extract information from the problem. Extract text features; 3) Reasoning unit in two-dimensional visual feature map Based on text features, perform standard thought chain reasoning to output a text sequence containing n logical steps. , represented as ;in, The inference step number; each inference step The semantic description can serve as a query anchor for retrieving the key image region corresponding to that step; therefore, the step text sequence It can serve as a basic index for subsequent visual positioning.
[0021] like Figure 2 The example shown outputs a sequence of text steps containing three logical steps. The steps are: "Step 1: Scan the entire image and locate the orange Fanta in all shelf areas", "Step 2: 6 bottles in the bottom right corner", and "Step 3: 6 bottles in the bottom left corner".
[0022] Step S112: The perception patch selection module selects the text sequence of the steps. Perform key region mining and output a mapping set between each reasoning step and its key visual evidence. ; In this step, the sequence of step text output by the initial inference module is used. As input for the query, from the two-dimensional visual feature map The set of visual patch vectors is obtained as the retrieval target. A multi-dimensional scoring strategy, including semantic similarity, gradient significance, and geometric position bias, is used for each inference step. Explicit mappings to the most relevant image patches are constructed as key regions, thereby accurately locating the pixel-level visual basis for each inference.
[0023] Key area mining includes the following steps: 1) Calculate semantic similarity score : Obtain visual patch vectors : 2D visual feature map Expanded by spatial location, each spatial location ( The D-dimensional feature vector at position () is a visual patch vector. ,in These are the specific height and width, and Two-dimensional visual feature map CCP One visual patch vector; Obtain the current reasoning step text vector : The current reasoning step The text is encoded through the embedding layer of a large language model, and the encoded sequence-level representation (such as average pooling or the hidden state at the [EOS] position) is taken as the semantic text vector for this step. ,and ; Calculate each visual patch vector With text vectors The cosine similarity between them, for all visual patch vectors The cosine similarity score is Z-score normalized and mapped to the [0,1] interval using the Sigmoid activation function, as follows: ,in, (.) is the cosine similarity function.
[0024] 2) Calculate the gradient significance score : This step first defines the reasoning steps. Autoregressive generation loss , represented as: ,in, Let be the autoregressive negative log-likelihood loss for the i-th inference step. For the current number In the first reasoning step One word element to be generated, This is the sequence number of the lexical term in the current reasoning step. Let I be the sequence of words generated before the j-th word in the current inference step, and Q be the input image and the input question. The inference steps that have been generated before the current step, and P is the conditional probability of generating the target word under the above conditions; The autoregressive generation loss is given an input image. ,question and previous steps text The model generates the current step word by word. Each word element The sum of the negative log-conditional probabilities, this loss can be directly obtained from the model's training loss function. Then, The output two-dimensional visual feature map is backpropagated to the visual encoder via an automatic differentiation mechanism. At this point, the loss is calculated for each spatial location ( The gradient of the visual feature at point () is calculated, and the L2 norm of the gradient is taken as the significance score of the patch. Finally, the gradient significance score of the entire image is normalized and mapped using a Sigmoid method, and is represented as follows: ,in, Score the gradient significance of the visual patch in the current step; Indicates loss For visual patch vectors The gradient; This represents the L2 norm of the vector. Calculating this gradient requires preserving the computational graph from visual features to loss, but does not require updating the model weights.
[0025] Gradient significance scoring can capture image regions that make causal contributions to model decisions.
[0026] 3) Perform position offset and calculate the position offset amount. ; First, from the current step, a natural language parser (such as regular expression matching or a lightweight NER module) is used. Location keywords (such as "top-left", "center", "bottom-right") are extracted from the text and mapped to spatial attention masks. During mapping, the image feature map is spatially divided into 3×3 grid regions according to a predefined location-region mapping table, and regions where keywords are matched are assigned higher spatial weights. (Target area is 2.0, adjacent areas are 1.5, and the remaining areas remain at 1.0), thus obtaining the position offset. .
[0027] 4) Perform window compensation and calculate the window consistency score. ; First, the visual patch vector Text vector of the current inference step L2 normalization is performed on each window, and one or more window scales are set. For each window scale, a local window is constructed by sliding the patch mesh on an H×W grid with a step size of 1. A 2×2 local window is preferably used in this invention.
[0028] For window scale set Any window scale in The corresponding local window is denoted as ,and Calculate the average value of the normalized visual patch vectors within the window, and then calculate the window semantic similarity between this average value and the normalized text vector, expressed as: ,in, The top left corner is located Scale is The average eigenvector of all L2-normalized visual patch vectors within a local window; The window semantic similarity is the average feature vector of this window and the L2 normalized text vector of the current inference step. These are the row and column coordinates of the top-left corner of the local window within the patch grid. This represents the side length of the window.
[0029] The semantic similarity of each local window is uniformly fed back to each visual patch within that window; for any visual patch The cumulative contribution of all overlapping windows containing the visual patch at each window scale is summed to obtain the cumulative window amount, which is expressed as: ; Normalize the maximum value of the cumulative window size for all visual patches: First, calculate the maximum cumulative window size. Then With the prevention of positive numbers with a denominator of zero The larger of the two is denoted as the normalized denominator. Multiply the normalized result by the window enhancement factor. The window compensation amount is obtained and expressed as: ; Calculate the mean of the full-image window compensation amount Subsequently, the window compensation amount of each visual patch is centered relative to the mean of the entire image to construct a multiplicative window consistency score centered at 1, expressed as: in, To prevent normalization of positive numbers with a denominator of zero, The maximum value of the cumulative amount of all visual patch windows. for and The larger one, This is the average compensation amount for all visual patch windows. The window consistency impact coefficient; This is the window enhancement factor, used to scale the cumulative amount of the normalized window. and All are dimensionless coefficients; In this embodiment, the preferred option is... , The higher the window consistency score, the more consistent the local neighborhood of the visual patch is with the semantics of the current inference step. By boosting spatially continuous regions and suppressing isolated high-response patches, the probability of noisy regions being mistakenly selected as key visual evidence can be reduced.
[0030] 5) The formula for calculating the overall score is as follows: ; All based on overall score Sort the image patches in descending order and select the highest-scoring ones. The patch is the first one. One reasoning step Key visual evidence set , represented as: ,in For the spatial index number of the patch, A value of 32 is typically used to ensure adequate visual coverage.
[0031] The output of the entire perception patch selection module is a set of mappings between each inference step and its key visual evidence. : Mapping set The feature injection module will pass the feature to the downstream module step by step.
[0032] Step S113: The feature injection module maps the set As input, the original visual features Make corrections to obtain enhanced visual features. This enables the reshaping of the feature space. Original visual features During the correction process, key visual evidence corresponding to each inference step is injected into the deep feature space of the visual encoder through a forward hook mechanism. This means that the original visual features are corrected in situ without changing the length of each feature sequence in the mapping set. This step does not require additional text token input, completely avoiding the sequence inflation problem caused by traditional explicit splicing methods.
[0033] The structure of the feature injection module is as follows: Figure 3 As shown, its input is the step-related image features (i.e., the mapping set). The feature injection module, consisting of a similarity attention calculation unit composed of multiple self-attention layers, normalization layers, and a feedforward neural network, first performs cross-attention matching between the original visual features and the image features associated with the steps, then performs gated residual fusion operation to complete the in-situ correction of the original visual features without expanding the feature sequence length, and finally outputs the enhanced image features. Figure 3 As can be seen, the enhanced image features do not require the addition of extra words, thus unlike traditional word concatenation schemes, it can eliminate the computational loss caused by sequence length expansion.
[0034] The process of reshaping the feature space includes the following steps: 1) Calculate the original visual features With key visual evidence The distribution of interactive attention between them is represented as: Where t is the inference step number, and the superscript T indicates the matrix transpose operation; The matrix is obtained by expanding the original visual features according to their spatial locations. This represents the original number of visual patches. Feature dimensions for each patch; For the first Selected from the reasoning steps The feature matrix is obtained by arranging the key visual patches row by row, therefore Softmax operates along the key visual evidence dimension, i.e., each row. Normalize each element to obtain Each element represents the attention weight of an original visual patch to a key visual evidence patch, with the sum of weights in each row being 1. 2) Define adaptive gating parameters The weighted key features are fused back into the original feature space to form enhanced visual features. , represented as: .
[0035] At this time, enhance visual features Dimensions and original visual features This maintains consistency and avoids the sequence growth problem caused by traditional splicing methods.
[0036] Step S114: The secondary refinement inference module enhances visual features. It performs self-correction and generates the final reasoning result.
[0037] In this step, visual features will be enhanced. The visual encoder of the Large Language Model (LLM) is input again to output the enhanced text sequence. Simultaneously, prompt words are constructed and modified through prompt word engineering to guide the large language model in reviewing its initial inference results (text sequence). Compare the enhanced reasoning results (enhanced text sequence) This identifies and corrects potential perceptual biases (such as misclassification of object categories or errors in spatial relationship inference due to visual illusions during initial reasoning). This is achieved by enhancing visual features. The fusion is already completed within the visual encoder via a forward hook mechanism, so there is no need to explicitly concatenate additional visual lexical units in the input text.
[0038] The decoder of the Large Language Model (LLM) references the context of the initial reasoning and enhanced visual information to correct potential illusion errors (such as correcting object misjudgment) and output a high-precision final answer and localization result.
[0039] like Figure 2As shown, the enhanced text sequence obtained after self-correction. The steps are: "Step 1: 6 bottles in the upper right corner" and "Step 2: 6 bottles in the lower left corner are bottled, not canned." The final deduction result is 6.
[0040] This invention employs an initial inference module to generate the foundational thought chain; through a perception patch selection module, it utilizes a multi-dimensional scoring strategy based on semantics, gradient, and position to achieve explicit fine-grained alignment between text and vision, thus solving the "black box" problem; particularly in the feature injection module, it utilizes a forward hook mechanism to achieve adaptive feature enhancement without increasing sequence length, significantly improving computational efficiency; and further, it employs a secondary refinement inference module to self-correct the corrected features. Therefore, the layout of the multimodal inference model structure in this invention greatly improves inference accuracy in complex scenarios, effectively suppresses visual illusions, and provides pixel-level interpretability, offering technical support for highly reliable artificial intelligence applications.
[0041] The above-disclosed embodiments are merely a few specific examples of the present invention. However, the present invention is not limited thereto, and any variations that can be conceived by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. A multimodal reasoning method for visual question answering, characterized in that, Includes the following steps: Get the original image and the problem ; Load the multimodal inference model and use the original image and the problem Input the multimodal reasoning model to obtain the final reasoning result; the multimodal reasoning model includes an initial reasoning module, a perception patch selection module, a feature injection module, and a secondary refinement reasoning module; The initial inference module is based on the original image. and the problem Preliminary analysis was performed to obtain the original visual features. Based on text features, output text sequence The initial inference module includes a text encoder, a visual encoder, and an inference unit; the visual encoder processes the original image. Encode to obtain two-dimensional visual feature maps The original visual features are obtained through spatial unfolding. The two-dimensional visual feature map Represented as: ,in, , These are the height and width of the feature map, respectively. For feature channel dimensions; the text encoder is used to extract information from the question. Extract text features; the inference unit outputs a step text sequence containing n logical steps. , represented as ,in, The sequence number of the reasoning step; The perception patch selection module selects the step text sequence. Perform key region mining and output a mapping set between each reasoning step and its key visual evidence. The key region mining includes: from two-dimensional visual feature maps Obtain visual patch vectors From the reasoning steps text vector Calculate semantic similarity score ; through reasoning steps Calculate gradient significance score From the current step Extract directional keywords from the text and calculate the positional offset. Perform window compensation and calculate the window consistency score. Calculate the overall score The calculation formula is: Based on the aforementioned comprehensive score Sort all image patches in descending order and select the highest-scoring ones. The patch is the first one. One reasoning step Key visual evidence set ; The feature injection module uses the mapping set As input, the original visual features Make corrections to obtain enhanced visual features. To achieve feature space reshaping; the feature space reshaping includes: calculating the original visual features. With key visual evidence The distribution of interactive attention between them is represented as: Where t is the inference step number, and the superscript T indicates the matrix transpose operation. The matrix is obtained by expanding the original visual features according to their spatial locations. For the first The inference steps select key visual patches and arrange them in rows to obtain the feature matrix; define adaptive gating parameters. The weighted key features are fused back into the original feature space to form enhanced visual features. , is represented as: ; The secondary refinement reasoning module applies the enhanced visual features. It performs self-correction and generates the final reasoning result.
2. The multimodal reasoning method for visual question answering according to claim 1, characterized in that, The acquisition of visual patch vectors At that time, the two-dimensional visual feature map Expanded by spatial location, each spatial location ( The D-dimensional feature vector at position () is a visual patch vector. ,in These are the specific height and width, and The two-dimensional visual feature map CCP One visual patch vector; Get text vector At that time, the reasoning steps The text is encoded through the embedding layer of a large language model, and the encoded sequence-level representation is taken as the text vector. ,and .
3. The multimodal reasoning method for visual question answering according to claim 1, characterized in that, The calculation of semantic similarity score At that time, calculate each visual patch vector. With text vectors The cosine similarity between them, for all visual patch vectors The similarity scores are Z-score normalized and mapped to the [0,1] interval using the Sigmoid activation function, as follows: ,in, (.) is the cosine similarity function.
4. The multimodal reasoning method for visual question answering according to claim 1, characterized in that, The calculation of gradient significance score Includes the following steps: Define the reasoning steps The autoregressive generation loss is expressed as: ,in, For the first Autoregressive negative log-likelihood loss for each inference step; The text sequence for the i-th reasoning step; This represents the total number of terms contained in the text sequence. For the current number In the first reasoning step One word element to be generated, This is the sequence number of the lexical element in the current reasoning step; The sequence of words generated before the j-th word in the current inference step; I is the input image, and Q is the input question. The inference steps that have been generated before the current step, and P is the conditional probability of generating the target word; Will The output two-dimensional visual feature map is backpropagated to the visual encoder via an automatic differentiation mechanism. At this point, the loss is calculated for each spatial location ( The gradient of the visual feature at point () is calculated, and the L2 norm of the gradient is taken as the significance score of the patch.
5. The multimodal reasoning method for visual question answering according to claim 1, characterized in that, The calculated position offset Includes the following steps: From the reasoning steps using a natural language parser Location keywords are extracted from the text and mapped to spatial attention masks. When mapping to spatial attention masks, the image feature map is spatially divided into 3×3 grid regions according to a predefined location-region mapping table, and spatial weights are assigned to the regions where keywords are matched. .
6. The multimodal reasoning method for visual question answering according to claim 1, characterized in that, The calculation window consistency score Includes the following steps: For visual patch vectors With text vectors Perform L2 normalization, set the window size, and construct a local window; For any window size Calculate the mean of the normalized visual patch vectors within the window and the window semantic similarity between the mean and the normalized text vectors; The semantic similarity of each local window is uniformly fed back to each visual patch within that local window; for any visual patch The contribution of all overlapping windows containing the visual patch at each window scale is summed to obtain the window accumulation amount; After normalizing the window cumulative values of all visual patches to their maximum values, a multiplicative window consistency score centered at 1 is constructed. .
7. The multimodal reasoning method for visual question answering according to claim 1, characterized in that, The self-correction refers to: enhancing the visual features Input a visual encoder, output an enhanced text sequence ; By constructing and refining prompt words through prompt word engineering, a large language model is guided to compare text sequences. With enhanced text sequence Identify and correct perceptual biases.
Citation Information
Patent Citations
Intellectual visual question and answer method and device based on big and small model collaboration and medium
CN121350217A
Visual question and answer method based on field adaptive retrieval decision
CN121743458A
