Multimodal-based contrastive decoding hallucination mitigation method and apparatus, and terminal

By perturbating and contrasting the input data of a multimodal large model, negative samples are generated to calibrate the model output, solving the problems of wasted computing resources and low efficiency of single-modal contrasting decoding in existing technologies, and achieving efficient illusion reduction and model performance improvement.

WO2026086750A1PCT designated stage Publication Date: 2026-04-30HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
Filing Date
2025-10-20
Publication Date
2026-04-30

AI Technical Summary

Technical Problem

Existing contrast decoding methods require the introduction of additional models, leading to increased computational resource overhead. Furthermore, single-modal contrast decoding cannot fully utilize the characteristics of large multimodal models and cannot effectively mitigate multimodal illusions.

Method used

By perturbing the input data of a large multimodal model, visual and linguistic perturbation data are generated and input into a large visual-linguistic model to generate initial and hallucination outputs. Then, the model output is calibrated by a contrastive decoding method, and the hallucination is reduced by utilizing the multimodal characteristics.

Benefits of technology

It significantly reduces computational resource requirements, improves illusion removal efficiency, reduces system complexity, and enhances the overall perception capability of multimodal models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025128822_30042026_PF_FP_ABST
    Figure CN2025128822_30042026_PF_FP_ABST
Patent Text Reader

Abstract

A multimodal-based contrastive decoding hallucination mitigation method and apparatus, and a terminal. The method comprises: acquiring target initial data, and performing multimodal perturbation processing on the target initial data to obtain target perturbed data, the target initial data comprising a target high-definition image and a target text prompt corresponding thereto; inputting the target initial data and the target perturbed data into a target model to obtain an initial output and a hallucination output, the target model being a large-scale visual language model; and performing contrastive decoding on the initial output and the hallucination output to obtain a target output. According to the solution, multimodal noise is added and compared with an initial output, thereby calibrating the prediction of the model and reducing the possibility of producing erroneous information.
Need to check novelty before this filing date? Find Prior Art

Description

A multimodal contrast decoding-based hallucination mitigation method, device, and terminal Technical Field

[0001] This invention relates to the field of multimodal large model technology, and in particular to a method, device and terminal for hallucination relief based on multimodal contrast decoding. Background Technology

[0002] In existing technologies, contrastive decoding typically requires the introduction of additional models for comparison and verification. This means that in addition to the original large model, extra computational resources and storage space are needed to run these auxiliary models. This not only increases the complexity of the system but also leads to increased computational resource overhead, thereby reducing overall performance. Furthermore, contrastive decoding, initially proposed as a technique in the field of natural language processing, is often limited to a single modality (e.g., text modality). When dealing with the illusion of a large multimodal model, single-modal contrastive decoding methods cannot fully utilize the characteristics of multimodality. Therefore, a more efficient and specialized approach is needed to address this problem.

[0003] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention

[0004] To address the aforementioned shortcomings of existing technologies, this invention provides a multimodal contrast decoding illusion mitigation method, apparatus, and terminal, aiming to solve the problem that existing contrast decoding methods require the introduction of additional models and cannot fully utilize multimodal characteristics.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0006] A first aspect of the present invention provides a method, apparatus, and terminal for mitigating hallucinations based on multimodal contrast decoding, the method comprising:

[0007] Acquire initial target data, perform multimodal perturbation processing on the initial target data to obtain perturbation data for the target, wherein the initial target data includes a high-resolution image of the target and its corresponding target text prompts;

[0008] The target initial data and the target perturbation data are input into the target model to obtain the initial output and the illusion output. The target model is a large visual language model.

[0009] The initial output and the hallucination output are compared and decoded to obtain the target output.

[0010] In one implementation, the step of performing multimodal perturbation processing on the initial target data to obtain target perturbation data includes:

[0011] Visual perturbation is applied to the image portion of the initial data of the target to obtain visual perturbation data of the target;

[0012] The text portion of the initial target data is perturbed to obtain perturbed target language data.

[0013] The target perturbation data is obtained based on the target visual perturbation data and the target language perturbation data.

[0014] In one implementation, visually perturbing the image portion of the initial target data to obtain visually perturbed target data includes:

[0015] The target high-resolution image in the initial target data is replaced with a completely white image to obtain the target perturbation image;

[0016] The target visual perturbation data is obtained by combining the target perturbation image with the target text prompt in the target initial data.

[0017] In one implementation, performing language perturbation on the text portion of the target initial data to obtain target language perturbation data includes:

[0018] The target portion of the target text prompt in the initial target data is replaced with a mask marker to obtain the target perturbation text;

[0019] The target perturbation text is combined with the target high-resolution image in the target initial data to obtain the target language perturbation data.

[0020] In one implementation, the step of inputting the initial target data and the target perturbation data into the target model to obtain the initial output and the illusion output includes:

[0021] The visual encoder in the target model extracts high-level visual features from the images in the target initial data, the target visual perturbation data, and the target language perturbation data, respectively, to obtain the initial visual vector, the visual perturbation visual vector, and the language perturbation visual vector.

[0022] The initial visual vector, the visual perturbation visual vector, and the language perturbation visual vector are respectively input into the language model in the target model to obtain the initial output, the visual illusion output, and the language illusion output;

[0023] The hallucination output is obtained based on the visual hallucination output and the linguistic hallucination output.

[0024] In one implementation, the comparison and decoding of the initial output and the hallucination output includes:

[0025] Obtain a first hyperparameter and a second hyperparameter, wherein the first hyperparameter is the weight corresponding to the visual hallucination output, and the second hyperparameter is the weight corresponding to the language hallucination output;

[0026] The initial output and the hallucination output are compared and decoded based on the first hyperparameter and the second hyperparameter.

[0027] In one implementation, the step of comparing and decoding the initial output and the hallucination output based on the first hyperparameter and the second hyperparameter includes:

[0028] The initial output and the hallucination output are compared and decoded based on a target formula, which is:

[0029] X'=(1+β1+β2)X-β1X V -β2X L ;

[0030] Where X is the initial output, X V For the visual illusion output, X L The output of the language illusion is β1 and β2, which are hyperparameters.

[0031] A second aspect of the present invention provides a multimodal contrast decoding hallucination mitigation device, comprising:

[0032] The perturbation module is used to acquire initial target data, perform multimodal perturbation processing on the initial target data to obtain perturbation data, wherein the initial target data includes a high-resolution image of the target and its corresponding target text prompt words;

[0033] The output module is used to input the target initial data and the target perturbation data into the target model to obtain the initial output and the illusion output. The target model is a large visual language model.

[0034] The comparison decoding module is used to compare and decode the initial output and the hallucination output to obtain the target output.

[0035] A third aspect of the present invention provides a terminal, the terminal including a processor and a computer-readable storage medium communicatively connected to the processor, the computer-readable storage medium being adapted to store a plurality of instructions, the processor being adapted to invoke the instructions in the computer-readable storage medium to perform steps implementing the multimodal contrast decoding illusion mitigation method described in any of the preceding claims.

[0036] In a fourth aspect, the present invention provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the multimodal contrast decoding hallucination mitigation method described in any of the preceding claims.

[0037] Compared with existing technologies, this invention provides a multimodal contrast decoding hallucination mitigation method, apparatus, and terminal. The multimodal contrast decoding hallucination mitigation method acquires initial target data, performs multimodal perturbation processing on the initial target data to obtain perturbation data, which includes a high-resolution image of the target and its corresponding target text prompts. Then, the initial target data and the perturbation data are input into a target model to obtain an initial output and a hallucination output. The target model is a large-scale visual language model. Finally, the initial output and the hallucination output are compared and decoded to obtain the target output. This multimodal contrast decoding hallucination mitigation method effectively reduces the risk of erroneous information generation by injecting noise into the multimodal input to generate negative samples and comparing them with the original output to calibrate the model output. It significantly alleviates the hallucination problem in large-scale multimodal models and demonstrates its great potential in improving the overall perceptual ability of the model. Attached Figure Description

[0038] Figure 1 is a flowchart of an embodiment of the multimodal contrast decoding hallucination mitigation method provided by the present invention;

[0039] Figure 2 is a reasoning process diagram of an embodiment of the multimodal contrast decoding hallucination mitigation method provided by the present invention;

[0040] Figure 3 shows the experimental results of an embodiment of the multimodal contrast decoding hallucination mitigation method provided by the present invention.

[0041] Figure 4 shows the experimental results of an embodiment of the multimodal contrast decoding hallucination mitigation method provided by the present invention.

[0042] Figure 5 shows the experimental results of an embodiment of the multimodal contrast decoding hallucination mitigation method provided by the present invention.

[0043] Figure 6 shows the experimental results of an embodiment of the multimodal contrast decoding hallucination mitigation method provided by the present invention.

[0044] Figure 7 shows the experimental results of an embodiment of the multimodal contrast decoding hallucination mitigation method provided by the present invention.

[0045] Figure 8 is a structural schematic diagram of an embodiment of the multimodal contrast decoding hallucination relief device provided by the present invention;

[0046] Figure 9 is a schematic diagram of an embodiment of the terminal provided by the present invention. Detailed Implementation

[0047] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0048] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0049] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0050] The multimodal contrast decoding illusion mitigation method provided by this invention can be applied to terminals with computing capabilities. The terminal can execute the multimodal contrast decoding illusion mitigation method provided by this invention to solve for the travel time of seismic waves.

[0051] Example 1

[0052] This embodiment presents a hallucination mitigation method based on contrastive decoding technology for multimodal large models. This method adds noise to both visual and verbal inputs, making the model more likely to produce outputs containing hallucinations. This noise is then compared to the initial output to calibrate the model's predictions and reduce the likelihood of generating erroneous information.

[0053] In the exploration of large-scale visual language models, the illusion problem has long been a prominent technical challenge. Current research mainly focuses on the linguistic level of the model, employing a series of strategies to alleviate this problem, including correction mechanisms, model uncertainty assessment, the use of high-quality training data, and contrastive decoding techniques. The following is a detailed explanation of these methods:

[0054] Correction Mechanism: The correction mechanism aims to reduce hallucinations by introducing additional correction steps. This involves using external knowledge bases or fact-checking systems to identify and correct errors in the generated content. The advantage of this method is that it can enhance the accuracy of the model output by leveraging external information sources, thereby increasing the reliability of the generated content.

[0055] Model uncertainty: Model uncertainty methods focus on quantifying the uncertainty in the model's generation process to identify potential illusory content. Techniques such as Bayesian methods or Monte Carlo sampling are used to estimate the confidence level of the model output. This approach allows researchers to pinpoint uncertain regions in the model output, facilitating deeper insights into model behavior and targeted optimization.

[0056] High-quality training data: Training the model with high-quality training data is another effective way to mitigate the hallucination problem. This means using manually labeled datasets to reduce noise and errors in the training material. Although building such datasets is costly, high-quality data can significantly improve the performance and reliability of the model.

[0057] Contrastive decoding is a search-based decoding method that punishes the generation of malicious patterns by optimizing a novel contrastive objective function. This method reduces hallucinations by adjusting model predictions based on the difference between true and false outputs.

[0058] The above points summarize the main technical means to solve the illusion problem in large-scale visual language models, highlighting the industry's professional efforts to improve the accuracy and reliability of models.

[0059] However, contrastive decoding typically requires the introduction of additional models for comparison and verification. This means that in addition to the original large model, extra computational resources and storage space are needed to run these auxiliary models. This not only increases the complexity of the system but also leads to increased computational resource overhead, thereby reducing overall performance. Furthermore, contrastive decoding, initially proposed as a technique in the field of natural language processing, is often limited to a single modality (e.g., text modality). When dealing with the illusion of a large multimodal model, single-modal contrastive decoding methods cannot fully utilize the characteristics of multimodality. Therefore, a more efficient and specialized approach is needed to address this issue.

[0060] This embodiment proposes a multimodal contrastive decoding-based hallucination mitigation method. It aims to stimulate visual and linguistic input data through noise injection, thereby inducing potential hallucinations in the visual and linguistic modules of a large multimodal model. A contrastive decoding mechanism is then used to remove these unwanted generated contents. Compared to traditional unimodal contrastive decoding, the method provided in this embodiment can comprehensively address the hallucination problem in the visual and linguistic domains of a large multimodal model, achieving more efficient hallucination suppression.

[0061] Furthermore, the multimodal contrastive decoding hallucination mitigation method generates hallucinogenic content by adding noise to the input data, without relying on additional auxiliary models, thus significantly saving computational resources. Overall, multimodal contrastive decoding not only improves the efficiency of hallucination removal but also reduces the system's complexity and computational resource requirements, demonstrating a novel strategy for hallucination processing that is both efficient and resource-saving.

[0062] Specifically, as shown in Figure 1, in one embodiment of the multimodal contrast decoding hallucination mitigation method provided by the present invention, the multimodal contrast decoding hallucination mitigation includes the following steps:

[0063] S100. Obtain initial target data, perform multimodal perturbation processing on the initial target data to obtain target perturbation data, wherein the initial target data includes a high-resolution image of the target and its corresponding target text prompts.

[0064] This embodiment primarily addresses the application of multimodal contrastive decoding for hallucination mitigation in large visual-language models such as LLaVA1.5, QwenVL, and InternVL. In processing multimodal data, these models frequently produce descriptions that appear semantically correct but are actually inconsistent with the image content—a phenomenon widely recognized as the "hallucination problem." To effectively alleviate this issue, we propose a multimodal contrastive decoding method based on perturbation and contrastive decoding. This method perturbs both visual and linguistic inputs and compares the initial output with the perturbated output to identify and reduce hallucination information.

[0065] Specifically, perturbation can be achieved by randomly masking specific regions in visual input or text fragments in verbal input, thereby revealing the hallucination effects that the model tends to produce. In applying this method, the system first receives visual and verbal input and generates an initial output. Then, by perturbing the input, the system produces a perturbed output. Next, by comparing the initial output with the perturbed output, the system adjusts its predictions to reduce the generation of hallucination information. This process enables the system to generate more accurate descriptions or answers when performing multimodal tasks. The specific technical steps and parameter settings will be described in detail below.

[0066] As shown in Figure 2, which is a schematic diagram of the reasoning process, the initial input, i.e., the target initial data, is perturbed. The target initial data consists of a high-quality high-resolution image of the target and its corresponding target text prompts, representing the model's input data under normal circumstances. For example, in a visual question-answering task, the initial input consists of an image and question text related to the image's content. In this embodiment, these initial inputs need to be perturbed, a process that can be divided into two parts: visual perturbation and linguistic perturbation.

[0067] Specifically, the step of performing multimodal perturbation processing on the initial target data to obtain target perturbation data includes:

[0068] S110. Visually perturb the image portion of the initial data of the target to obtain visually perturbed data of the target.

[0069] The step of visually perturbing the image portion of the initial data of the target to obtain visually perturbed data of the target includes:

[0070] The target high-resolution image in the initial target data is replaced with a completely white image to obtain the target perturbation image;

[0071] The target visual perturbation data is obtained by combining the target perturbation image with the target text prompt in the target initial data.

[0072] Specifically, in the visual perturbation, by comparing various methods, this embodiment ultimately chose to replace the image with a completely white image, that is, to set the values ​​of all pixels to 0, in order to minimize the amount of information the model obtains from the visual input.

[0073] Then, the replaced all-white image is combined with the target text prompt in the target initial data to obtain the target visual perturbation data.

[0074] S120. Perform language perturbation on the text portion of the target initial data to obtain target language perturbation data.

[0075] The step of perturbing the text portion of the initial target data to obtain perturbed target language data includes:

[0076] The target portion of the target text prompt in the initial target data is replaced with a mask marker to obtain the target perturbation text;

[0077] The target perturbation text is combined with the target high-resolution image in the target initial data to obtain the target language perturbation data.

[0078] In language perturbation, a portion of the target text cue is randomly replaced with a mask marker, such as the [MASK] marker in BERT. Although the modified text differs semantically from the original description, it maintains overall comprehensibility while reducing the amount of information available. This yields the perturbated target text. The perturbated target text is then combined with the high-resolution target image from the initial target data to obtain the perturbated target language data.

[0079] S130. The target perturbation data is obtained based on the target visual perturbation data and the target language perturbation data.

[0080] The target perturbation data is composed of the target visual perturbation data and the target language perturbation data.

[0081] Thus, by adding noise, three types of inputs are obtained: the original input, the input with added visual noise, and the input with added text noise. In this embodiment, the original input is the target initial data, the input with added visual noise is the target visual perturbation data, and the input with added text noise is the target language perturbation data.

[0082] The effectiveness of the selected perturbation method will then be verified by comparing the model performance of these three inputs.

[0083] S200. Input the target initial data and the target perturbation data into the target model to obtain the initial output and the illusion output. The target model is a large visual language model.

[0084] The step of inputting the initial target data and the target perturbation data into the target model to obtain the initial output and the hallucination output includes:

[0085] The initial target data is input into the target model to obtain the initial output;

[0086] The target visual perturbation data is input into the target model to obtain a visual illusion output;

[0087] The target language perturbation data is input into the target model to obtain the language illusion output;

[0088] The hallucination output is obtained based on the visual hallucination output and the linguistic hallucination output.

[0089] Specifically, the steps of inputting the initial target data into the target model to obtain the initial output; inputting the target visual perturbation data into the target model to obtain a visual hallucination output; and inputting the target language perturbation data into the target model to obtain a language hallucination output specifically include:

[0090] The visual encoder in the target model extracts high-level visual features from the images in the target initial data, the target visual perturbation data, and the target language perturbation data, respectively, to obtain the initial visual vector, the visual perturbation visual vector, and the language perturbation visual vector.

[0091] The initial visual vector, the visual perturbation visual vector, and the language perturbation visual vector are respectively input into the language model in the target model to obtain the initial output, the visual illusion output, and the language illusion output;

[0092] The hallucination output is obtained based on the visual hallucination output and the linguistic hallucination output.

[0093] Specifically, in the model generation stage, the target model is first used to perform preliminary reasoning on the target initial data and the target perturbation data to obtain the initial output and the illusion output.

[0094] Specifically, the initial target data, the visual perturbation data, and the language perturbation data are first input into the target model, and the visual encoder and language model of the target model process the visual input and language input corresponding to the initial target data, the visual perturbation data, and the language perturbation data, respectively.

[0095] Both the visual encoder and the language model in the target model have been pre-trained on large-scale datasets, possessing powerful feature extraction and understanding capabilities. The visual encoder is responsible for extracting high-level visual features from images, such as the shape, color, and texture of objects. Specifically, high-resolution images of various input data are first processed into a series of visual feature vectors, representing different parts of the image and their features. These feature vectors are then passed to the language model as the basis for generating text descriptions. The language model is responsible for generating text descriptions related to the image content. These descriptions are based on the features extracted by the visual encoder and the semantic understanding capabilities of the language model itself. The input text descriptions undergo a series of word embeddings and contextual processing to generate initial text outputs related to the image content.

[0096] In the absence of noise, the target model generates an unaffected initial output. However, when noise is added to the input data, the target model behaves differently. Adding visual noise to the target visual perturbation data interferes with the visual encoder, preventing it from acquiring sufficient information. This forces the target model to rely more heavily on the language model for inference, using its inherent knowledge and preferences to generate output in the absence of visual information. Conversely, adding textual noise to the target language perturbation data makes it difficult for the language model to accurately parse text content, forcing the target model to rely more heavily on the visual encoder and utilize visual information to generate output.

[0097] At this stage, the initial outputs of the model under different noise conditions are obtained, namely the initial output, the visual hallucination output, and the linguistic hallucination output. These initial outputs may contain hallucinations or misleading information because visual or linguistic perturbations have been introduced into the input data. Thus, in the next stage, the initial outputs, the visual hallucination outputs, and the linguistic hallucination outputs will be used for correction.

[0098] S300: Compare and decode the initial output and the hallucination output to obtain the target output.

[0099] The step of comparing and decoding the initial output and the hallucination output includes:

[0100] Obtain a first hyperparameter and a second hyperparameter, wherein the first hyperparameter is the weight corresponding to the visual hallucination output, and the second hyperparameter is the weight corresponding to the language hallucination output;

[0101] The initial output and the hallucination output are compared and decoded based on the first hyperparameter and the second hyperparameter.

[0102] The step of comparing and decoding the initial output and the hallucination output based on the first hyperparameter and the second hyperparameter includes:

[0103] The initial output and the hallucination output are compared and decoded based on a target formula, which is:

[0104] X'=(1+β1+β2)X-β1X V -β2X L ;

[0105] Where X is the initial output, X' is the target output, and X' is the target output. V For the visual illusion output, X L The output of the language illusion is defined as β1 and β2, which are hyperparameters with β1 = β2 = 0.5.

[0106] In this embodiment, the multimodal contrast decoding method is used in the contrast decoding stage. By comparing the initial output generated by the target model with the hallucination output, the output distribution of the target model is calibrated to reduce hallucination phenomena and improve overall performance.

[0107] Specifically, after the model generation phase is completed, the target model will generate the initial output X and the language illusion output X, which is more likely to contain illusions originating from language components, based on the target initial data, the target visual perturbation data, and the target language perturbation data, respectively. L The visual illusion output X is more likely to contain illusions originating from visual components. V These outputs are generated by the neural network of the target model and are in log-odds form.

[0108] Then, the logarithmic probabilities of the initial output, the visual hallucination output, and the linguistic hallucination output are compared and decoded.

[0109] Specifically, two hyperparameters are set: the first hyperparameter β1 and the second hyperparameter β2, which correspond to the weights of the visual and language components in multimodal contrastive decoding, respectively. In this embodiment, β1 = β2 = 0.5. Based on the target formula, the initial output and the hallucination output are compared and decoded according to the log-odds of the output. The target formula is:

[0110] X'=(1+β1+β2)X-β1X V -β2X L

[0111] Where X is the initial output, X' is the target output, and X' is the target output. V For the visual illusion output, X L The output of the language illusion is β1 and β2, which are hyperparameters.

[0112] Among them, two outputs X are more likely to contain hallucinations. L and X V It serves as a negative sample.

[0113] For example, when the target model is asked, "How many birds are in the picture?" without inputting an image, the target model will make an inference based on the parameters it has trained. In practical applications, the target model may also ignore the image content and make inferences based on the parameters, thus causing visual illusions.

[0114] Based on this, in this embodiment, by explicitly interfering with the input, the target model is forced to use its own parameters to make inferences, thereby revealing the model's tendency to produce illusions.

[0115] Then, by subtracting from the log odds, multimodal contrastive decoding reduces the weight of potential illusions and increases the weight of the correct answer, thereby correcting the model output.

[0116] Continuing with the example of "How many birds are in the picture?", when processing the query "How many birds are in the picture?", suppose the question is directed to an image containing 10 birds. Based on the information the target model may have learned during training, the image is most likely to contain 1 bird. Therefore, when generating the answer, the number 1 is assigned the highest log odds. The multimodal contrastive decoding method adjusts the log odds, reducing the log odds of answer 1 while increasing the log odds of the correct answer 10, thus accurately correcting the output of the target model. Finally, the target model uses the softmax function to correct the log odds, samples, and decodes to the final output.

[0117] Specifically, in this embodiment, multiple experiments were conducted on three widely used benchmarks: POPE, AMBER, and MME, to verify the effectiveness of the multimodal-based contrast decoding hallucination mitigation method in reducing hallucinations and improving the overall perceptual ability of the model.

[0118] Specifically, the experimental results on the POPE benchmark are as follows:

[0119] The POPE benchmark is used to evaluate object illusion in large visual language models. It employs a binary classification task to determine whether a specific object exists in a given image, and includes three sampling strategies: random, popular, and adversarial. The experimental results are shown in Figure 3.

[0120] As can be seen, the multimodal contrast decoding illusion mitigation method provided in this embodiment, also known as the multimodal contrast decoding method (MCD), exhibits significant improvements under different models and settings. Specifically, compared with the baseline method (Vanilla) and the visual contrast decoding method (VCD), the multimodal contrast decoding method (MCD) significantly improves the accuracy of object recognition, especially under adversarial sampling strategies, where it effectively reduces the illusions generated by the model when processing complex visual information. This improvement not only enhances the model's accuracy in object recognition tasks but also strengthens its robustness in complex tasks.

[0121] The experimental results on the AMBER benchmark are as follows:

[0122] The AMBER benchmark is used for evaluating hallucinations in low-level visual models. It includes high-quality images and detailed annotations, covering three types of hallucinations: presence, attribute, and relation. The experimental results are shown in Figure 4.

[0123] As can be seen, the multimodal contrast decoding method (MCD) provided in this embodiment significantly outperforms the baseline method (Vanilla) and the visual contrast decoding method (VCD) in terms of attributes and relationships. Specific data shows that the multimodal contrast decoding method (MCD) achieves a significant improvement in accuracy in these two sub-tasks, indicating that the multimodal contrast decoding method (MCD) is more advantageous in processing complex visual and linguistic information.

[0124] The experimental results on the MME benchmark are as follows:

[0125] The MME benchmark evaluates the perceptual and cognitive abilities of a large visual language model across 14 sub-tasks. The experimental results are shown in Figure 5.

[0126] Furthermore, in this embodiment, the specific performance of the multimodal contrast decoding method (MCD) and the baseline method (Vanilla) on 14 sub-tasks is compared in detail, as shown in Figure 6.

[0127] The described Multimodal Contrast Decoding (MCD) method delivers continuous improvements in perception tasks while maintaining the model's recognition capabilities. Specifically, MCD improves performance on 12 out of 14 sub-tasks in the MME, demonstrating particularly strong performance in perception tasks. This indicates that MCD not only reduces illusions but also enhances model performance across multiple tasks. For example, in image captioning and question answering tasks, MCD significantly improves model accuracy and consistency, showcasing its significant potential for practical applications.

[0128] Finally, in this embodiment, an ablation experiment was also conducted. Specifically, to verify the effectiveness of using contrast decoding in the multimodal domain, a single-modal ablation experiment was designed to compare the multimodal contrast decoding method (MCD) with contrast decoding methods that modify visual or language input separately.

[0129] Ablation experiments were conducted using the LLaVA 1.5 model on the POPE dataset, and the results are shown in Figure 7.

[0130] It can be seen that modifying either the visual or language input separately in the contrastive decoding method can improve the performance of the baseline model, while multimodal contrastive decoding achieves the best performance, surpassing methods that modify a single modality. This proves that both the language and visual components can be subject to illusions, and the proposed multimodal contrastive decoding method can simultaneously reduce the influence of illusions in both components, thus achieving better performance. Ablation experiments further validate the effectiveness of the proposed multimodal contrastive decoding method.

[0131] In this embodiment, by combining contrastive decoding with multimodal input, an effective contrastive objective is designed to address the illusion problem of the visual and linguistic components in large multimodal models. The model's prediction is optimized by comparing the initial output with the illusionary output. The "multimodal contrastive decoding" method is the core of this approach, generating negative samples to calibrate the model's output by perturbing the visual or linguistic input. Furthermore, this embodiment employs a "fixed hyperparameter" method to ensure experimental consistency; uses a "multi-benchmark testing" method to verify the model's generality; and combines "single-modal ablation studies" to further validate the effectiveness of multimodal contrastive decoding.

[0132] These innovative methods and technologies significantly mitigate the illusion problem in large modal models and demonstrate their potential to enhance the overall perception capabilities of large modal models.

[0133] This method generates hallucinatory outputs by perturbing visual or verbal inputs and compares them with the initial outputs, thereby calibrating the model's output distribution and reducing the occurrence of hallucinations.

[0134] Specifically, the multimodal contrast decoding strategy proposed in this embodiment improves the overall performance of the model by simultaneously perturbing visual and linguistic inputs, covering a wider range of hallucination types.

[0135] An adaptive rationality constraint is proposed, and the accuracy of the decoding process is further improved by applying the adaptive rationality constraint mechanism;

[0136] Finally, the effectiveness of the method was verified through multi-benchmark evaluation on three benchmark tests: POPE, AMBER, and MME.

[0137] In summary, this embodiment provides a multimodal contrastive decoding hallucination mitigation method. It acquires initial target data, performs multimodal perturbation processing on the initial target data to obtain perturbed target data. The initial target data includes a high-resolution image of the target and its corresponding target text prompts. Then, the initial target data and the perturbed target data are input into a target model to obtain an initial output and a hallucination output. The target model is a large-scale visual language model. Finally, the initial output and the hallucination output are compared and decoded to obtain the target output. The multimodal contrastive decoding hallucination mitigation method proposed in this embodiment effectively reduces the risk of generating erroneous information by injecting noise into the multimodal input to generate negative samples and comparing them with the original output to calibrate the model output. It significantly alleviates the hallucination problem in large-scale multimodal models and demonstrates its great potential in improving the overall perceptual ability of the model.

[0138] It should be understood that although the steps in the flowcharts shown in the accompanying drawings are displayed sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0139] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0140] Example 2

[0141] Based on the above embodiments, the present invention also provides a multimodal contrast decoding hallucination mitigation device, as shown in FIG8, the multimodal contrast decoding hallucination mitigation device comprising:

[0142] The perturbation module is used to acquire initial target data, perform multimodal perturbation processing on the initial target data to obtain perturbation data, wherein the initial target data includes a high-resolution image of the target and its corresponding target text prompt words, as described in Embodiment 1.

[0143] The output module is used to input the target initial data and the target perturbation data into the target model to obtain the initial output and the illusion output. The target model is a large visual language model, as described in Embodiment 1.

[0144] The comparison decoding module is used to compare and decode the initial output and the hallucination output to obtain the target output, as described in Embodiment 1.

[0145] Example 3

[0146] Based on the above embodiments, the present invention also provides a terminal, as shown in FIG9, which includes a processor 10 and a memory 20. FIG9 only shows some components of the terminal, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0147] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a multimodal contrast decoding illusion mitigation program 30, which can be executed by the processor 10 to implement the multimodal contrast decoding illusion mitigation method of this application.

[0148] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other chip, used to run program code stored in the memory 20 or process data, such as executing the multimodal contrast decoding hallucination mitigation method.

[0149] In one embodiment, when the processor 10 executes the multimodal contrast decoding hallucination mitigation program 30 in the memory 20, the following steps are performed:

[0150] Acquire initial target data, perform multimodal perturbation processing on the initial target data to obtain perturbation data for the target, wherein the initial target data includes a high-resolution image of the target and its corresponding target text prompt words;

[0151] The target initial data and the target perturbation data are input into the target model to obtain the initial output and the illusion output. The target model is a large visual language model.

[0152] The initial output and the hallucination output are compared and decoded to obtain the target output.

[0153] Example 4

[0154] The present invention also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the multimodal contrast decoding illusion mitigation method described above.

[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-modal based contrastive decoding hallucination mitigation method, characterized in that, The multimodal contrast decoding hallucination mitigation method includes: Acquire initial target data, perform multimodal perturbation processing on the initial target data to obtain perturbation data for the target, wherein the initial target data includes a high-resolution image of the target and its corresponding target text prompts; The target initial data and the target perturbation data are input into the target model to obtain the initial output and the illusion output. The target model is a large visual language model. The initial output and the hallucination output are compared and decoded to obtain the target output.

2. The multi-modal based contrastive decoding hallucination mitigation method of claim 1, wherein, The process of performing multimodal perturbation processing on the initial target data to obtain target perturbation data includes: Visual perturbation is applied to the image portion of the initial data of the target to obtain visual perturbation data of the target; The text portion of the initial target data is perturbed to obtain perturbed target language data. The target perturbation data is obtained based on the target visual perturbation data and the target language perturbation data.

3. The multi-modal based contrastive decoding hallucination mitigation method of claim 2, wherein, The step of visually perturbing the image portion of the initial data of the target to obtain visually perturbed data of the target includes: The target high-resolution image in the initial target data is replaced with a completely white image to obtain the target perturbation image; The target visual perturbation data is obtained by combining the target perturbation image with the target text prompt in the target initial data.

4. The multi-modal based contrastive decoding hallucination mitigation method of claim 2, wherein, The step of perturbing the text portion of the initial target data to obtain perturbed target language data includes: The target portion of the target text prompt in the initial target data is replaced with a mask marker to obtain the target perturbation text; The target perturbation text is combined with the target high-resolution image in the target initial data to obtain the target language perturbation data.

5. The multi-modal based contrastive decoding hallucination mitigation method of claim 2, wherein, The step of inputting the initial target data and the target perturbation data into the target model to obtain the initial output and the hallucination output includes: The visual encoder in the target model extracts high-level visual features from the images in the target initial data, the target visual perturbation data, and the target language perturbation data, respectively, to obtain the initial visual vector, the visual perturbation visual vector, and the language perturbation visual vector. The initial visual vector, the visual perturbation visual vector, and the language perturbation visual vector are respectively input into the language model in the target model to obtain the initial output, the visual illusion output, and the language illusion output; The hallucination output is obtained based on the visual hallucination output and the linguistic hallucination output.

6. The multi-modal based contrastive decoding hallucination mitigation method of claim 5, wherein, The step of comparing and decoding the initial output and the hallucination output includes: Obtain a first hyperparameter and a second hyperparameter, wherein the first hyperparameter is the weight corresponding to the visual hallucination output, and the second hyperparameter is the weight corresponding to the language hallucination output; The initial output and the hallucination output are compared and decoded based on the first hyperparameter and the second hyperparameter.

7. The multi-modal based contrastive decoding hallucination mitigation method of claim 6, wherein, The step of comparing and decoding the initial output and the hallucination output based on the first hyperparameter and the second hyperparameter includes: The initial output and the hallucination output are compared and decoded based on a target formula, which is: X' = (1 + β1+ β2) X - β1X V - β2X L ; where X' is the target output, X is the initial output, X V is the visual hallucination output, X L is the language hallucination output, β1 and β2 are hyperparameters.

8. A multi-modal based contrast decoding hallucination mitigation device, characterized in that, include: The disturbance module is configured to obtain target initial data, and perform multi-modal disturbance processing on the target initial data to obtain target disturbance data, wherein the target initial data comprises a target high-definition image and a corresponding target text prompt word of the target high-definition image. The output module is configured to input the target initial data and the target disturbance data into a target model to obtain an initial output and an illusion output, wherein the target model is a large visual language model. The contrast decoding module is configured to perform contrast decoding on the initial output and the illusion output to obtain a target output.

9. A terminal, characterized by comprising: The terminal comprises a processor, a computer readable storage medium in communication connection with the processor, and the computer readable storage medium is adapted to store a plurality of instructions, and the processor is adapted to call the instructions in the computer readable storage medium to perform the steps of the multi-modal based contrast decoding illusion mitigation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the multi-modal based contrast decoding illusion mitigation method according to any one of claims 1-7.

Citation Information

Cited By

  • Fine-grained hallucination detection and correction method and device for multi-modal diffusion language model

    CN122156920A