A Multimodal Illusion Mitigation Method Based on Cross-Modal Feature Routing Enhancement
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-08-14
AI Technical Summary
然而,单纯依赖前向注意力激活无法区分真实信息贡献与预训练固化的冗余连接,导致诊断结果存在偏差
[0040]This invention achieves accurate quantization of visual information flow within a multimodal large language model by constructing a multimodal feature routing quantization model. This effectively diagnoses the phenomena of language prior dominance and the underutilization of visual information. Based on and
This invention quantifies the contextual dependencies and feature reorganization capabilities between image patches, while simultaneously measuring the effective mobilization of visual features by textual features, thereby revealing potential hallucination generation phenomena during model inference. By implementing cross-modal routing enhancement on key fusion layers, this invention strengthens the transmission of visual information to textual features, suppresses redundant self-circulating attention caused by linguistic priors, and enables the model to fully utilize visual evidence during text generation. The enhanced model significantly reduces erroneous completions, visual omissions, and generated content inconsistent with the input image caused by linguistic statistical bias. Furthermore, this method outputs hallucination-relieved text samples, cross-modal attention distribution, routing strength changes, and multi-layer information flow heatmaps, and quantitatively evaluates inference consistency based on visual fact consistency rate, hallucination generation ratio, cross-modal semantic matching degree, and inference reliability score. In summary, this invention has significant technical effects in improving cross-modal inference reliability, alleviating hallucination generation, and enhancing the utilization of visual information.
Smart Images

Figure CN122574418A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and specifically to a multimodal illusion mitigation method based on cross-modal feature routing enhancement. Background Technology
[0002] In recent years, Multimodal Large Language Models (MLLMs) have achieved significant performance improvements in tasks such as visual question answering, image captioning, and cross-modal reasoning. By jointly encoding visual information and textual instructions in a unified semantic space, MLLMs can achieve semantic understanding and generation in complex scenarios. However, with the increase in model size and the diversification of training corpora, the model still exhibits a significant "illusion generation" phenomenon in actual reasoning, where the output of the model deviates from or is inconsistent with the visual facts of the input image. This problem usually stems from the model's over-reliance on language priors: in the multimodal fusion layer, textual modality features typically dominate the attention distribution, causing visual information to be marginalized in the reasoning chain and unable to fully contribute to the final decision. This not only limits the model's application in high-precision, multi-domain tasks but also poses potential risks in safety-critical scenarios such as medical image analysis and document understanding. Therefore, how to accurately quantify the flow path of visual information within the model and effectively enhance visual-text cross-modal interaction to alleviate the illusion generation problem has become a core technical challenge that urgently needs to be addressed in current multimodal reasoning research.
[0003] Existing research mainly focuses on evaluating multimodal feature interactions using attention weights or saliency analysis. However, simply relying on forward attention activation cannot distinguish between genuine information contributions and pre-trained redundant connections, leading to biased diagnostic results. Furthermore, existing methods largely remain at the model analysis level, lacking structured interventions to address cross-modal information flow attenuation, making it difficult to significantly improve the utilization of visual evidence during the generation process in the inference stage. Therefore, this field needs a technical solution that can both quantify multimodal information flow and accurately identify key feature interaction paths, and improve visual-text routing through structured enhancement techniques. By introducing an information contribution matrix based on attention sensitivity and a cross-modal feature routing enhancement strategy, effective enhancement of visual information in key fusion layers can be achieved, thereby significantly alleviating the hallucination generation problem at the output end and improving the inference reliability and consistency of multimodal large language models in complex scenarios. Summary of the Invention
[0004] To address the technical problem of hallucination output caused by insufficient visual information in multimodal model inference, this invention provides a multimodal hallucination mitigation method based on cross-modal feature routing enhancement, comprising:
[0005] S1. Construct multimodal input samples and complete unified feature encoding. Obtain multimodal input samples containing visual image samples and text instruction samples. Input the visual image samples into a pre-trained visual encoder to extract and encode them into a visual feature unit sequence. At the same time, input the text instruction samples into a language encoding module to generate a text feature unit sequence. Then, concatenate the visual feature unit sequence and the text feature unit sequence in a unified semantic space to form a multimodal joint input sequence.
[0006] S2. Extract multi-layer attention activation and establish a hierarchical feature interaction structure. Input the multimodal joint input sequence into the multimodal Transformer network for forward propagation. Extract the attention weight matrix of the multi-head attention mechanism in each layer of the Transformer network. Establish a hierarchical information propagation structure based on the attention weight matrix. Output the multi-head attention matrix and multimodal information propagation structure of each layer.
[0007] S3. Based on the task loss function, calculate the gradient response of the attention elements in the attention weight matrix, and multiply the activation value of the attention weight matrix with the gradient response to construct an information contribution matrix that quantifies the strength of effective information contribution between feature units.
[0008] S4. Based on the information contribution matrix, define a set of visual feature units and a set of visual internal interactions. By calculating the mean of all feature unit pairs in the set of visual internal interactions on the information contribution matrix, obtain a visual cohesion flow index that quantifies the contextual dependence and structural reorganization ability between image blocks.
[0009] S5. Based on the information contribution matrix, define a cross-modal interaction set. By calculating the mean of all feature units in the cross-modal interaction set on the information contribution matrix, obtain a cross-modal routing strength index that measures the degree of effective invocation of visual feature units by text feature units. At the same time, combine the visual cohesion flow index to perform consistency correction on the cross-modal routing strength index to obtain a corrected cross-modal routing strength index, which is used to improve the stability and accuracy of subsequent anomaly layer determination.
[0010] S6. Determine whether the corrected cross-modal routing strength index is less than the preset routing threshold. If so, identify the layer as an abnormal layer and enhance the cross-modal routing representation of the abnormal layer by enhancing the attention contribution of the visual feature unit to the text feature unit. Otherwise, identify the layer as a non-abnormal layer, keep the current layer feature representation unchanged, and output it directly. Finally, output the optimized joint feature representation after anomaly determination and routing enhancement.
[0011] S7. Input the optimized joint feature representation after anomaly detection and route enhancement into the decoding module to perform inference, generate an output sequence with hallucination relief, and output the output sequence as the final result.
[0012] Furthermore, in S1, the visual image samples include: natural scene images, document images, medical images, and video frame data; the visual feature unit sequence is represented as:
[0013]
[0014] in, It is a sequence of visual feature units. For the first One visual feature unit;
[0015] The text feature unit sequence is represented as follows:
[0016]
[0017] in, A sequence of text feature units. For the first Each text feature unit.
[0018] Furthermore, in S2, the attention weight matrix is represented as follows:
[0019]
[0020] in Indicates the first Layer The first one in the attention. The feature unit for the first The intensity of attention allocation for each feature unit. is the length of the joint feature unit sequence.
[0021] Furthermore, in S3, the information contribution matrix is represented as:
[0022]
[0023] in For the total number of attention heads, For cross-modal attention weights, Indicates the first The feature unit for the first The effective information contribution intensity of each feature unit This is the task loss function.
[0024] Furthermore, in S4, the visual cohesive flow index is expressed as...
[0025]
[0026] in, As a visual cohesive flow index, It is a collection of visual internal interactions.
[0027] Furthermore, in S5, the cross-modal routing index The calculation formula is:
[0028]
[0029] in, For cross-modal routing metrics, A collection of cross-modal interactions;
[0030] The formula for calculating the modified cross-modal routing strength index is as follows:
[0031]
[0032] in, This is the revised cross-modal routing strength index.
[0033] Furthermore, in S6, the optimized joint feature representation after anomaly detection and route enhancement is processed by a fusion function:
[0034]
[0035] in, This is the optimized joint feature representation output after anomaly detection and route enhancement. For the enhanced information contribution matrix, Contribution matrix to the original information To preset the routing threshold, The corrected cross-modal routing strength index, This is the fusion function;
[0036] for In other words, its expression is:
[0037]
[0038] in, For visual routing enhancement coefficients, The text loop attention inhibition coefficient, These are the self-attention weights within the text modality.
[0039] The beneficial effects of this invention are:
[0040] This invention achieves accurate quantization of visual information flow within a multimodal large language model by constructing a multimodal feature routing quantization model. This effectively diagnoses the phenomena of language prior dominance and the underutilization of visual information. Based on and This invention quantifies the contextual dependencies and feature reorganization capabilities between image patches, while simultaneously measuring the effective mobilization of visual features by textual features, thereby revealing potential hallucination generation phenomena during model inference. By implementing cross-modal routing enhancement on key fusion layers, this invention strengthens the transmission of visual information to textual features, suppresses redundant self-circulating attention caused by linguistic priors, and enables the model to fully utilize visual evidence during text generation. The enhanced model significantly reduces erroneous completions, visual omissions, and generated content inconsistent with the input image caused by linguistic statistical bias. Furthermore, this method outputs hallucination-relieved text samples, cross-modal attention distribution, routing strength changes, and multi-layer information flow heatmaps, and quantitatively evaluates inference consistency based on visual fact consistency rate, hallucination generation ratio, cross-modal semantic matching degree, and inference reliability score. In summary, this invention has significant technical effects in improving cross-modal inference reliability, alleviating hallucination generation, and enhancing the utilization of visual information. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating the implementation process of the present invention;
[0042] Figure 2 This is a schematic diagram of the input samples corresponding to the multimodal hallucination phenomenon;
[0043] Figure 3 Heatmap of attention distribution in intermediate layer modes;
[0044] Figure 4 Example output diagram after cross-modal routing enhancement. Detailed Implementation
[0045] The technical solution of the present invention will be further described below with reference to embodiments, but it is not limited thereto. Any modifications or equivalent substitutions to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be covered within the protection scope of the present invention. In the following embodiments, process equipment or devices not specifically specified are all conventional equipment or devices in the art. Unless specifically specified, the technical means used in the embodiments of the present invention are all conventional means well known to those skilled in the art.
[0046] Example 1, combined with Figure 1 This embodiment describes a multimodal hallucination mitigation method based on cross-modal feature routing enhancement, comprising:
[0047] S1. Construct multimodal input samples and complete unified feature encoding. Obtain multimodal input samples containing visual image samples and text instruction samples. Input the visual image samples into a pre-trained visual encoder to extract and encode them into a visual feature unit sequence. At the same time, input the text instruction samples into a language encoding module to generate a text feature unit sequence. Then, concatenate the visual feature unit sequence and the text feature unit sequence in a unified semantic space to form a multimodal joint input sequence.
[0048] S2. Extract multi-layer attention activation and establish a hierarchical feature interaction structure. Input the multimodal joint input sequence into the multimodal Transformer network for forward propagation. Extract the attention weight matrix of the multi-head attention mechanism in each layer of the Transformer network. Establish a hierarchical information propagation structure based on the attention weight matrix. Output the multi-head attention matrix and multimodal information propagation structure of each layer.
[0049] S3. Based on the task loss function, calculate the gradient response of the attention elements in the attention weight matrix, and multiply the activation value of the attention weight matrix with the gradient response to construct an information contribution matrix that quantifies the strength of effective information contribution between feature units.
[0050] S4. Based on the information contribution matrix, define a set of visual feature units and a set of visual internal interactions. By calculating the mean of all feature unit pairs in the set of visual internal interactions on the information contribution matrix, obtain a visual cohesion flow index that quantifies the contextual dependence and structural reorganization ability between image blocks.
[0051] S5. Based on the information contribution matrix, define a cross-modal interaction set. By calculating the mean of all feature units in the cross-modal interaction set on the information contribution matrix, obtain a cross-modal routing strength index that measures the degree of effective invocation of visual feature units by text feature units. At the same time, combine the visual cohesion flow index to perform consistency correction on the cross-modal routing strength index to obtain a corrected cross-modal routing strength index, which is used to improve the stability and accuracy of subsequent anomaly layer determination.
[0052] S6. Determine whether the corrected cross-modal routing strength index is less than the preset routing threshold. If so, identify the layer as an abnormal layer and enhance the cross-modal routing representation of the abnormal layer by enhancing the attention contribution of the visual feature unit to the text feature unit. Otherwise, identify the layer as a non-abnormal layer, keep the current layer feature representation unchanged, and output it directly. Finally, output the optimized joint feature representation after anomaly determination and routing enhancement.
[0053] S7. Input the optimized joint feature representation after anomaly detection and route enhancement into the decoding module to perform inference, generate an output sequence with hallucination relief, and output the output sequence as the final result.
[0054] Specifically, Figure 1 The entire process of the multimodal hallucination relief method of the present invention is demonstrated. Figure 2 The structure of input samples that can easily induce hallucinations in multimodal large language models is visually demonstrated and can be used to verify the effectiveness of this method in identifying and alleviating hallucination phenomena.
[0055] Furthermore, in S1, the visual image samples include: natural scene images, document images, medical images, and video frame data; the visual feature unit sequence is represented as:
[0056]
[0057] in, It is a sequence of visual feature units. For the first One visual feature unit;
[0058] The text feature unit sequence is represented as follows:
[0059]
[0060] in, A sequence of text feature units. For the first Each text feature unit.
[0061] Specifically, this step outputs a sequence of visual feature units. Text feature unit sequence The multimodal joint feature sequence and the attention activation information of each layer of the Transformer will provide the foundation for subsequent information flow analysis and saliency modeling.
[0062] Furthermore, in S2, the attention weight matrix is represented as follows:
[0063]
[0064] in Indicates the first Layer The first one in the attention. The feature unit for the first The intensity of attention allocation for each feature unit. is the length of the joint feature unit sequence.
[0065] Since the attention matrix characterizes the information routing relationships within the model, the information interaction paths between different feature units can be represented by attention connections. A hierarchical information propagation structure is established by traversing all layers to describe the information flow between the visual and textual modalities. The attention matrices of each layer can be visualized, as shown below. Figure 3 The heatmap of attention distribution in the intermediate layer modality is shown. The horizontal axis represents text, image, and historical feature units, and the vertical axis represents the number of Transformer layers. The color intensity reflects the attention intensity, providing a basis for subsequent cross-modal routing quantification analysis.
[0066] The multi-head attention matrices, hierarchical feature unit interaction graphs, and multimodal information propagation structures output in this step will be used for subsequent saliency sensitivity calculations.
[0067] Furthermore, in S3, the information contribution matrix is represented as:
[0068]
[0069] in For the total number of attention heads, For cross-modal attention weights, Indicates the first The feature unit for the first The effective information contribution intensity of each feature unit This is the task loss function.
[0070] Specifically, to eliminate the interference of redundant attention connections on the analysis results, this step introduces the first-order gradient response information of the task loss function with respect to the attention matrix, constructing an information contribution matrix by jointly using forward activation and backward gradient. To this end, the current task loss function is first defined. ,in For the current input sample, It can be cross-entropy loss, generation loss, or classification loss.
[0071] Subsequently, backpropagation is performed on the attention matrix to obtain the gradient response of the loss function with respect to the attention elements.
[0072]
[0073] The attention activation value is then multiplied by the gradient sensitivity to construct the first... The information contribution matrix of the layer can quantify the information interaction paths that actually participate in the model's reasoning and decision-making.
[0074] Furthermore, in S4, the visual cohesive flow index is expressed as...
[0075]
[0076] in, As a visual cohesive flow index, It is a collection of visual internal interactions.
[0077] Specifically, this step, based on the information contribution matrix obtained in S3, quantitatively analyzes the information interaction within the visual modality. Define the set of visual feature units:
[0078]
[0079] Constructing a collection of visual internal interactions:
[0080]
[0081] Subsequently, a visual cohesive flow metric is defined, which quantifies the contextual dependencies and structural reorganization capabilities between image patches and reflects the model's depth of understanding of spatial relationships and visual semantics. When A higher value indicates that the model can effectively establish spatial semantic relationships within the visual field.
[0082] Furthermore, in S5, the cross-modal routing index The calculation formula is:
[0083]
[0084] in, For cross-modal routing metrics, A collection of cross-modal interactions;
[0085] The formula for calculating the modified cross-modal routing strength index is as follows:
[0086]
[0087] in, This is the revised cross-modal routing strength index.
[0088] Specifically, to analyze whether the text modality effectively invokes visual information, this method further establishes a visual-to-text information flow model. A cross-modal interaction set is defined as follows:
[0089]
[0090] in, For cross-modal interaction sets, Indexes for text feature units. For indexes of visual feature units, For the complete set of text feature units, The set of visual feature units is defined; further, a cross-modal routing strength index is defined, wherein... It is used to measure the degree to which text feature units effectively call upon visual feature units, and can characterize whether visual evidence truly participates in the reasoning process.
[0091] when When the value decreases significantly, it indicates that visual information is not being fully utilized in cross-modal inference, and the model begins to over-rely on the text modality, resulting in a language prior dominance phenomenon. At this time, the information flow within text features is enhanced, while the routing from visual features to text features is weakened, and the cross-modal fusion link is weakened accordingly.
[0092] therefore, The decrease in [something] can serve as an important criterion for distinguishing between multimodal hallucinations and visual neglect problems, and can also provide quantitative guidance for cross-modal feature routing enhancement, model intervention strategy design, and hallucination mitigation effect evaluation.
[0093] Furthermore, in S6, the optimized joint feature representation after anomaly detection and route enhancement is processed by a fusion function:
[0094]
[0095] in, This is the optimized joint feature representation output after anomaly detection and route enhancement. For the enhanced information contribution matrix, Contribution matrix to the original information To preset the routing threshold, The corrected cross-modal routing strength index, This is the fusion function;
[0096] for In other words, its expression is:
[0097]
[0098] in, For visual routing enhancement coefficients, The text loop attention inhibition coefficient, These are the self-attention weights within the text modality.
[0099] Specifically, for those that meet the conditions The key fusion layer enhances the attention contribution of visual feature units to text feature units, achieving cross-modal routing enhancement. Specifically, this includes increasing the response strength of visual features in the feature representation space, increasing the attention of text features to image regions, and suppressing redundant textual self-looping attention caused by language priors. This allows the model to fully utilize visual evidence and reduce illusion generation. Otherwise, the feature representation of the current fusion layer remains unchanged, and the joint feature result of the current layer is directly output to maintain the stability of existing cross-modal semantic associations.
[0100] In S7, joint features will be used. The input is fed into the decoding module to generate the output. The text results obtained were alleviated by hallucinations, specifically as follows: Figure 4 As shown. The output can be visual question answering, image description, multimodal reasoning, or medical diagnostic text. The output before and after enhancement can be compared. and It can evaluate cross-modal consistency and hallucination mitigation effects. The model can fully utilize visual evidence during text generation, significantly reducing language bias-induced omissions, visual omissions, and generated content inconsistent with the input image.
[0101] like Figure 4 As shown, after intervention by the method of this invention, the model can correctly identify the local lattice distortion region and output results such as "local lattice distortion was observed, with topological defects of pairing five-membered rings and seven-membered rings, rather than a perfect six-membered ring structure".
[0102] Compared to the model output before intervention, this invention can significantly enhance the participation of visual evidence in the reasoning process, effectively alleviate the hallucination generation problem caused by language prior dominance, and improve the model's reasoning reliability and cross-modal consistency in complex microscopic image scenes.
Claims
1. A multimodal hallucination mitigation method based on cross-modal feature routing enhancement, wherein the method is used to improve the utilization rate of visual information in the inference process of a multimodal large language model and alleviate the hallucination output caused by language prior dominance, characterized in that, include: S1. Construct multimodal input samples and complete unified feature encoding. Obtain multimodal input samples containing visual image samples and text instruction samples. Input the visual image samples into a pre-trained visual encoder to extract and encode them into a visual feature unit sequence. At the same time, input the text instruction samples into a language encoding module to generate a text feature unit sequence. Then, concatenate the visual feature unit sequence and the text feature unit sequence in a unified semantic space to form a multimodal joint input sequence. S2. Extract multi-layer attention activation and establish a hierarchical feature interaction structure. Input the multimodal joint input sequence into the multimodal Transformer network for forward propagation. Extract the attention weight matrix of the multi-head attention mechanism in each layer of the Transformer network. Establish a hierarchical information propagation structure based on the attention weight matrix. Output the multi-head attention matrix and multimodal information propagation structure of each layer. S3. Based on the task loss function, calculate the gradient response of the attention elements in the attention weight matrix, and multiply the activation value of the attention weight matrix with the gradient response to construct an information contribution matrix that quantifies the strength of effective information contribution between feature units. S4. Based on the information contribution matrix, define a set of visual feature units and a set of visual internal interactions. By calculating the mean of all feature unit pairs in the set of visual internal interactions on the information contribution matrix, obtain a visual cohesion flow index that quantifies the contextual dependence and structural reorganization ability between image blocks. S5. Based on the information contribution matrix, define a cross-modal interaction set. By calculating the mean of all feature units in the cross-modal interaction set on the information contribution matrix, obtain a cross-modal routing strength index that measures the degree of effective invocation of visual feature units by text feature units. At the same time, combine the visual cohesion flow index to perform consistency correction on the cross-modal routing strength index to obtain a corrected cross-modal routing strength index, which is used to improve the stability and accuracy of subsequent anomaly layer determination. S6. Determine whether the corrected cross-modal routing strength index is less than the preset routing threshold. If so, identify the layer as an abnormal layer and enhance the cross-modal routing representation of the abnormal layer by enhancing the attention contribution of the visual feature unit to the text feature unit. Otherwise, identify the layer as a non-abnormal layer, keep the current layer feature representation unchanged, and output it directly. Finally, output the optimized joint feature representation after anomaly determination and routing enhancement. S7. Input the optimized joint feature representation after anomaly detection and route enhancement into the decoding module to perform inference, generate an output sequence with hallucination relief, and output the output sequence as the final result.
2. The multimodal hallucination mitigation method based on cross-modal feature routing enhancement according to claim 1, characterized in that, In S1, the visual image samples include: natural scene images, document images, medical images, and video frame data; the visual feature unit sequence is represented as: in, It is a sequence of visual feature units. For the first One visual feature unit; The text feature unit sequence is represented as follows: in, A sequence of text feature units. For the first Each text feature unit.
3. The multimodal hallucination mitigation method based on cross-modal feature routing enhancement according to claim 2, characterized in that, In S2, the attention weight matrix is represented as follows: in Indicates the first Layer The first one in the attention. The feature unit for the first The intensity of attention allocation for each feature unit. is the length of the joint feature unit sequence.
4. The multimodal hallucination mitigation method based on cross-modal feature routing enhancement according to claim 3, characterized in that, In S3, the information contribution matrix is represented as follows: in For the total number of attention heads, For cross-modal attention weights, Indicates the first The feature unit for the first The effective information contribution intensity of each feature unit This is the task loss function.
5. A multimodal hallucination mitigation method based on cross-modal feature routing enhancement according to claim 4, characterized in that, In S4, the visual cohesive flow index is expressed as in, As a visual cohesive flow index, It is a collection of visual internal interactions.
6. A multimodal hallucination mitigation method based on cross-modal feature routing enhancement according to claim 5, characterized in that, In S5, the cross-modal routing index The calculation formula is: in, For cross-modal routing metrics, A collection of cross-modal interactions; The formula for calculating the modified cross-modal routing strength index is as follows: in, This is the revised cross-modal routing strength index.
7. A multimodal hallucination mitigation method based on cross-modal feature routing enhancement according to claim 6, characterized in that, In S6, the optimized joint feature representation after anomaly detection and route enhancement is processed by a fusion function: in, This is the optimized joint feature representation output after anomaly detection and route enhancement. For the enhanced information contribution matrix, Contribution matrix to the original information To preset the routing threshold, The corrected cross-modal routing strength index, This is the fusion function; for In other words, its expression is: in, For visual routing enhancement coefficients, The text loop attention inhibition coefficient, These are the self-attention weights within the text modality.