Multi-modal large language model visual hallucination suppression decoding method based on uncertainty perception subspace correction
Patent Information
- Application Number
- CN202610752367.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-18
AI Technical Summary
[0014]鉴于现有多模态大语言模型在推理阶段存在视觉幻觉问题以及全局线性抑制方法可能破坏语义流形结构的问题,本发明提出一种基于不确定性感知子空间校正的多模态大语言模型视觉幻觉抑制解码方法
[0025]与现有技术相比,本发明所具有的有益效果有:
Smart Images

Figure CN122597945A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of artificial intelligence, multimodal information processing and large-scale pre-trained model technology, and specifically relates to a decoding method for visual illusion suppression in multimodal large language models based on uncertainty-aware subspace correction. Background Technology
[0002] In recent years, Multimodal Large Language Models (MLLMs) have made significant progress in tasks such as visual question answering, image caption generation, and cross-modal reasoning. By aligning and training a visual encoder with a large-scale language model, MLLMs can process image and text information in a unified representation space, thereby achieving complex visual language understanding and generation capabilities.
[0003] However, in practical applications, multimodal large language models still suffer from a serious object hallucination problem. Object hallucination refers to the model generating text that outputs objects, attributes, or relationships that are inconsistent with the image content or do not exist in the image. For example, when an object does not exist in an image, the model still generates a description of that object; or when an object in an image is blue, the model generates incorrect attributes such as yellow.
[0004] This problem seriously affects the credibility and reliability of the model in real-world applications, especially in high-risk scenarios such as medical assisted diagnosis, autonomous driving perception analysis, and industrial inspection, where visual hallucinations can lead to serious consequences.
[0005] Existing research generally agrees that one of the main reasons for visual illusions generated by multimodal large language models is the excessive interference of language priors. Because language models are pre-trained on massive amounts of text data, they have developed strong linguistic statistical regularities. When visual information is ambiguous or noisy, the model tends to rely on language priors for completion, thus generating content that does not match the image.
[0006] In the multimodal generation process, the output probability distribution at the current time step is usually expressed as: in: This indicates the output token for the current time step; Represents the historical generation sequence; Indicates a text query; Indicates image input; This indicates the final hidden state.
[0007] Existing methods for suppressing visual hallucinations mostly employ the following two strategies: The first type of method is the contrastive decoding method. Its basic idea is to construct a bias branch (e.g., a blind image branch) in addition to the original multimodal branch, and then perform linear attenuation in the logit space. in This represents the predicted logit vector output at the current time step of the original multimodal main branch (i.e., when it contains both real images and text query inputs); This represents the logit vector reflecting the language prior output at the current time step of the bias branch (e.g., the blind image branch or the plain text branch); This represents the corrected logit vector used for final word prediction after linear contrast attenuation. This is the adjustment coefficient.
[0008] While this type of method reduces the incidence of hallucinations to some extent, it has significant problems: (1) Global linear weakening of language prior ignores the dual role of language prior; (2) When visual information is consistent with language prior, this weakening operation may destroy the normal semantic structure; (3) Linear extrapolation may push the hidden state away from the normal decoding manifold region.
[0009] The second type of method is uncertainty control or multi-branch fusion method, which adjusts the generated result by entropy or confidence. However, this type of method usually operates on the logit layer or output layer and lacks characterization of the hidden representation space structure.
[0010] Further analysis reveals that in high-dimensional hidden representation spaces, normal decoding states are typically concentrated within a low-dimensional semantic manifold region. If the hidden states are globally linearly shifted, for example: in, This represents the normal decoded original hidden state generated by the model under multimodal joint input (real image and text); This represents the hidden state generated within the model under blind input conditions (empty image and text), reflecting the prior bias of language. This represents the new hidden state obtained after the original hidden state is subjected to a global linear translation. This is the adjustment coefficient.
[0011] Then when When the value is large, the hidden state may be pushed away from the semantic manifold region, resulting in unstable generation, semantic shift, or decreased generation quality.
[0012] Therefore, existing methods generally suffer from the following shortcomings: they do not explicitly model the structure of language priors; the intervention method is global linear translation, which lacks geometric constraints; the intervention intensity lacks an adaptive mechanism; and they may disrupt the manifold structure of the hidden state.
[0013] In view of the above problems, there is an urgent need to propose a new multimodal decoding intervention method that can selectively weaken the language prior while maintaining the stability of the semantic manifold structure, thereby suppressing visual illusions while maintaining generative coherence and stability. Summary of the Invention
[0014] Given the visual illusion problem in the inference stage of existing multimodal large language models and the potential for global linear suppression methods to disrupt semantic manifold structures, this invention proposes a visual illusion suppression decoding method for multimodal large language models based on uncertainty-aware subspace correction.
[0015] This invention is applicable to various multimodal generation scenarios, including visual question answering, image description generation, multimodal reasoning, human-computer interaction systems, and intelligent decision-making assistance systems. By constructing a language prior subspace and adaptively weakening only the components of the language prior subspace during decoding while maintaining orthogonal semantic components, this invention suppresses illusions while ensuring the stability of the representation structure.
[0016] This invention provides a decoding method for visual hallucination suppression based on uncertainty-aware subspace correction in a multimodal large language model, comprising the following steps: (1) Construct blind input samples using text queries, input the blind input samples into the frozen multimodal large language model, extract the feature vectors output by the final layer of the model as hidden state vectors, construct the language prior hidden state matrix, and obtain the language prior subspace through singular value decomposition; (2) Input real images and text queries into the multimodal large language model, and extract the current feature vector of the final layer output of the model as the original hidden state at each time step of autoregressive decoding; (3) Project the original hidden state onto the language prior subspace to obtain the language prior projection component; (4) Calculate the consistency metric based on the directional consistency between the original hidden state and the language prior projection components; (5) Calculate the prediction uncertainty based on the probability distribution of the token output at the current time step, and construct the uncertainty gating coefficient; (6) Adaptively weaken the language prior projection components using consistency metric and uncertainty gating coefficient to obtain the corrected hidden state; (7) Input the corrected hidden state into the output mapping layer to obtain the final token prediction probability distribution at the current time step and complete the decoding generation.
[0017] According to a preferred embodiment of the present invention, in step (1), the blind input samples only contain text queries and empty images, and a blind input sample set containing N blind input samples is constructed. ,in: For the first One text query; Enter an empty image or a visual placeholder.
[0018] According to a preferred embodiment of the present invention, in step (1), each blind input sample is input into a frozen multimodal large language model to extract the final layer hidden state vector. ; Calculate the mean vector of all hidden state vectors: ; The hidden states are centralized, and a hidden state matrix is constructed: ; For the hidden state matrix Perform singular value decomposition: ; in: It is a left singular vector matrix; It is a singular value matrix; It is a right singular vector matrix; Take matrix The former Column vectors form the basis vector matrix of the language prior subspace. .
[0019] According to a preferred embodiment of the present invention, in step (2), during the real input stage, the real image is... Text query Input to a multimodal large language model Autoregressive decoding is performed in this process; In the Each decoding time step yields the original hidden state. ; The original hidden state Input to output mapping layer, output mapping based on function This yields the logit vector for the current time step. ; right Perform a Softmax operation to obtain the token prediction probability distribution at the current time step: ; in: Represents token The logit value; This represents all candidate tokens.
[0020] According to a preferred embodiment of the present invention, step (3) includes the following steps: Projecting the original hidden state onto the language prior subspace yields the language prior projection component: ;in: This is the original hidden state vector at the current time step. Let the basis vector matrix of the language prior subspace be denoted as . Calculate orthogonal semantic components : ; The original hidden state is represented as: .
[0021] According to a preferred embodiment of the present invention, step (4) includes the following steps: Consistency Measurement The calculation expression is as follows: ; in: Represents the cosine similarity function; Used to measure the degree of deviation between the current hidden state and the language prior direction.
[0022] According to a preferred embodiment of the present invention, step (5) includes the following steps: Calculate Shannon entropy: ;in: Output the predicted probability distribution of the token for the current time step; Constructing uncertainty gating coefficients: ; in: This is an uncertainty adjustment parameter.
[0023] According to a preferred embodiment of the present invention, step (6) includes the following steps: The calculation expression for correcting the hidden state is as follows: ; in: The maximum reduction coefficient; For uncertainty gate coefficient; This is a consistency metric. For language prior projection components.
[0024] According to a preferred embodiment of the present invention, the correction operation in step (6) applies only to the language prior subspace components, while the semantic components that are orthogonal to the language prior subspace remain unchanged.
[0025] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) This invention utilizes text queries to construct blind input samples and combines them with singular value decomposition (SVD) to extract a subspace that can characterize the language prior features inside the model. This achieves an accurate characterization of the language prior distribution in the high-dimensional hidden representation space of a multimodal large model, overcoming the shortcomings of existing methods that lack explicit modeling of language priors.
[0026] (2) This invention employs an adaptive gating mechanism based on directional consistency measurement and prediction uncertainty. During the decoding stage, only the feature components projected onto the language prior subspace are dynamically weakened, while the semantic components orthogonal to them remain unchanged. This technique significantly suppresses visual illusions while ensuring the integrity and coherence of the generated text, overcoming the problem that traditional global linear contrastive decoding easily destroys the normal semantic manifold structure and leads to a decrease in generation quality.
[0027] (3) Existing anti-hallucination methods usually require updating model parameters or significantly increasing computational overhead. This invention intervenes entirely during the inference stage, adding only one low-dimensional projection and simple vector scaling operation in a single forward propagation, resulting in low computational complexity. It has minimal impact on the overall inference time and has extremely high engineering practical value and system deployment feasibility. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating the steps of the multimodal large language model visual illusion suppression decoding method based on uncertainty-aware subspace correction according to the present invention.
[0029] Figure 2 This is a schematic diagram illustrating the specific implementation process of the multimodal large language model visual illusion suppression decoding method based on uncertainty-aware subspace correction according to the present invention. Detailed Implementation
[0030] To describe the present invention more specifically, the technical solution of the present invention will be described in detail below with reference to specific embodiments. This embodiment is illustrated using a visual question answering task as an example, but the method of the present invention is not limited to visual question answering tasks, and is also applicable to image description generation, multimodal reasoning, and other multimodal generation tasks.
[0031] like Figure 1 and Figure 2As shown, the present invention provides a multimodal large language model visual hallucination suppression decoding method based on uncertainty-aware subspace correction, comprising the following offline and online stages, which are described in detail below with reference to specific embodiments: a. Offline phase: 1) Construction of the language prior subspace: In this embodiment, a blind input sample set is first constructed. ,in: For the first One text query; Enter an empty image or a visual placeholder; are natural numbers and , The number of blind input samples.
[0032] In this embodiment, the selected A number of different text queries were used as blind input samples.
[0033] Blind input samples are fed into the frozen multimodal large language model. In the process, extract the hidden state vector of the final layer. .
[0034] Calculate the mean vector of the blind hidden states: Construct a centralized hidden state matrix : right Perform singular value decomposition: in: It is a left singular vector matrix; It is a singular value matrix; It is a right singular vector matrix.
[0035] In this embodiment, the preceding step is taken. The principal directions serve as the basis matrices for the language prior subspace: This subspace characterizes the main directions of representational change in the language model in the absence of visual input.
[0036] b. Online phase: 2) Input real images and text queries into the multimodal large language model, and extract the current feature vector of the final layer output of the model as the original hidden state at each time step of autoregressive decoding; Specifically, in the real input stage, real images are used. Text query Input to model Autoregressive decoding is performed in it.
[0037] In the Each decoding time step yields the original hidden state. ; Will Input to output mapping layer, output mapping based on function This yields the logit vector for the current time step. right Perform a Softmax operation to obtain the token prediction probability distribution at the current time step: in: Represents token The logit value; This represents all candidate tokens.
[0038] 3) Project the original hidden state into the language prior subspace to obtain the language prior projection component.
[0039] In this embodiment, the original hidden state is projected onto the language prior subspace to obtain the language prior projection component: in, This is the original hidden state vector at the current time step. Let be the basis vector matrix of the language prior subspace.
[0040] Calculate orthogonal semantic components : The original hidden state can now be represented as: 4) Calculate the consistency metric based on the directional consistency between the original hidden state and the language prior projection components; calculate the prediction uncertainty based on the prediction probability distribution of the output token at the current time step, and construct the uncertainty gating coefficient.
[0041] First, calculate the cosine similarity: The consistency metric is: when When the value is large, it indicates a conflict between the current representation direction and the prior language direction.
[0042] Then Shannon entropy was calculated: Constructing uncertainty gating coefficients: Uncertainty adjustment parameter in this embodiment The value is 0.5.
[0043] 5) Adaptively weaken the language prior projection components using consistency metrics and uncertainty gating coefficients to obtain the corrected hidden state; input the corrected hidden state into the output mapping layer to obtain the final token prediction probability distribution at the current time step and complete the decoding generation.
[0044] Specifically, this embodiment constructs the weakening coefficient: In this embodiment, the maximum attenuation coefficient α is set to 0.6.
[0045] Weakening of prior language components based on weakening coefficients: Corrected hidden state Input-output mapping function, to obtain the first The final logit vector of each decoding time step : The final predicted probability distribution is obtained further: .
[0046] This invention repeats the operation of each time step of the above autoregressive decoding until the entire autoregressive decoding process is completed, thereby realizing the visual illusion suppression decoding of a multimodal large language model based on uncertainty-aware subspace correction.
[0047] Theoretical stability description of the method of this invention: The method of this invention satisfies the following bounded constraints: in Since the scaling factor is preset, the correction operation has an upper limit on the amplitude, which will not cause a large shift in the hidden state.
[0048] At the same time, the present invention satisfies the subspace orthogonality preservation property: This invention only adjusts the prior language components without changing the orthogonal semantic information.
[0049] To verify the effectiveness of the method of the present invention in suppressing visual illusions, this embodiment was experimentally tested on a publicly available multimodal benchmark dataset and compared with the method before migration (Vanilla decoding), the linear contrast suppression method (LinearSuppression), and the uncertainty-only method.
[0050] The experimental evaluation indicators include: Precision, Recall, F1-score, and Hallucination Rate.
[0051] Table 1 shows the results obtained through relevant experimental tests of the original decoding method, the linear suppression method, the uncertainty-only gating method, and the method of this invention, along with the Precision, Recall, F1, and Hallucination Rate indices calculated from the labeled truth values.
[0052] Table 1 As can be seen from Table 1, this implementation method does not significantly reduce the recall rate while ensuring improved precision, and the F1 score is significantly better than other methods, indicating that the method of the present invention maintains the integrity and coherence of the generated text while suppressing visual illusions.
[0053] Compared with the original decoding, the hallucination rate of the method of the present invention is reduced by 0.1042; compared with the linear suppression method, the F1-score of the method of the present invention is improved by 0.0688; compared with the uncertainty-only gating method, the hallucination rate of the method of the present invention is further reduced by 0.0531.
[0054] The experimental results show that, by explicitly modeling the subspace structure, this invention effectively suppresses the visual illusion problem caused by excessive interference from language priors while maintaining the stability of the semantic manifold.
[0055] Furthermore, in terms of inference efficiency, the method of this invention only adds one low-dimensional projection and simple vector operation in a single forward propagation process, resulting in a computational complexity of O(n). ,in To hide dimensions, For subspace dimension, usually Therefore, it has a relatively small impact on the overall inference time and is suitable for deployment in actual systems.
Claims
1. A decoding method for visual hallucination suppression based on uncertainty-perceptual subspace correction in a multimodal large language model, characterized in that, Includes the following steps: (1) Construct blind input samples using text queries, input the blind input samples into the frozen multimodal large language model, extract the feature vectors output by the final layer of the model as hidden state vectors, construct the language prior hidden state matrix, and obtain the language prior subspace through singular value decomposition; (2) Input real images and text queries into the multimodal large language model, and extract the current feature vector of the final layer output of the model as the original hidden state at each time step of autoregressive decoding; (3) Project the original hidden state onto the language prior subspace to obtain the language prior projection component; (4) Calculate the consistency metric based on the directional consistency between the original hidden state and the language prior projection components; (5) Calculate the prediction uncertainty based on the probability distribution of the token output at the current time step, and construct the uncertainty gating coefficient; (6) Adaptively weaken the language prior projection components using consistency metric and uncertainty gating coefficient to obtain the corrected hidden state; (7) Input the corrected hidden state into the output mapping layer to obtain the final token prediction probability distribution at the current time step and complete the decoding generation.
2. The method according to claim 1, characterized in that: In step (1), the blind input samples only contain text queries and empty images, and a blind input sample set containing N blind input samples is constructed. ,in: For the first One text query; Enter an empty image or a visual placeholder.
3. The method according to claim 1, characterized in that: In step (1), each blind input sample is fed into the frozen multimodal large language model to extract the final layer hidden state vector. ; Calculate the mean vector of all hidden state vectors: ; The hidden states are centralized, and a hidden state matrix is constructed: ; For the hidden state matrix Perform singular value decomposition: ; in: It is a left singular vector matrix; It is a singular value matrix; It is a right singular vector matrix; Take matrix The former Column vectors form the basis vector matrix of the language prior subspace. .
4. The method according to claim 1, characterized in that: In step (2), during the real input stage, the real image is... Text query Input to a multimodal large language model Autoregressive decoding is performed in this process; In the Each decoding time step yields the original hidden state. ; The original hidden state Input to output mapping layer, output mapping based on function This yields the logit vector for the current time step. ; right Perform a Softmax operation to obtain the token prediction probability distribution at the current time step: ; in: Represents token The logit value; This represents all candidate tokens.
5. The method according to claim 1, characterized in that: Step (3) includes the following steps: Projecting the original hidden state onto the language prior subspace yields the language prior projection component: ;in: This is the original hidden state vector at the current time step. Let the basis vector matrix of the language prior subspace be denoted as . Calculate orthogonal semantic components : ; The original hidden state is represented as: 。 6. The method according to claim 1, characterized in that: Step (4) includes the following steps: Consistency Measurement The calculation expression is as follows: ; in: Represents the cosine similarity function; Used to measure the degree of deviation between the current hidden state and the language prior direction.
7. The method according to claim 1, characterized in that: Step (5) includes the following steps: Calculate Shannon entropy: ;in: Output the predicted probability distribution of the token for the current time step; Constructing uncertainty gating coefficients: ; in: This is an uncertainty adjustment parameter.
8. The method according to claim 1, characterized in that: Step (6) includes the following steps: The calculation expression for correcting the hidden state is as follows: ; in: The maximum reduction coefficient; For uncertainty gate coefficient; This is a consistency metric. For language prior projection components.
9. The method according to claim 1, characterized in that: The correction operation in step (6) applies only to the language prior subspace components, while the semantic components that are orthogonal to the language prior subspace remain unchanged.