Image token compression filtering-based multi-modal large language model anti-illusion method and system
By employing an image token compression filtering method, utilizing a multimodal information bottleneck module and adaptive image token filtering technology, the visual illusion problem in multimodal large language models is solved, achieving efficient anti-illusion effects and a low-latency reasoning process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-07
AI Technical Summary
Existing multimodal large language models suffer from visual illusion problems in visual understanding tasks. Existing anti-illusion methods rely on additional large models or multi-stage decoding, resulting in high inference latency and computational overhead. Furthermore, redundant visual token pruning strategies are not refined enough and cannot adapt to the complexity differences of different images.
An image token-based compression and filtering method is adopted. Feature-level compression and adaptive image token filtering are performed through a multimodal information bottleneck module. By utilizing a fully connected layer network, a normalization network, and an information compression module, combined with a multimodal information bottleneck objective function and a binary guided objective function, redundant visual information is dynamically identified and pruned, and redundant clusters are identified and filtered by clustering.
It significantly improves the anti-hallucination ability and efficiency of multimodal large language models, reduces inference latency, enhances the interpretability and factual consistency of the model, and reduces computational overhead while maintaining language generation capabilities.
Smart Images

Figure CN121811408A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of multimodal model optimization technology, and in particular relates to a method and system for anti-hallucination of multimodal large language models based on image token compression filtering. Background Technology
[0002] In recent years, multimodal large language models have made significant progress in tasks such as image captioning, visual question answering (VQA), and multimodal reasoning. Mainstream methods typically fuse pre-trained visual encoders (such as CLIP) with large language models (such as LLaMA and T5) through cross-modal alignment modules to achieve the understanding and generation of joint semantics between images and text. However, despite continuous performance improvements, existing visual language models still commonly suffer from visual illusions, where the generated text content is inconsistent with the actual visual content of the input image, or even includes objects or attributes that do not exist in the image. Such illusions severely weaken the reliability and credibility of models in safety-critical scenarios such as healthcare, education, and autonomous driving.
[0003] To alleviate visual hallucinations, existing technologies mainly focus on the following three approaches: (1) Post-processing correction methods, such as using auxiliary large models to self-reflect or reorder the generated results, such as Woodpecker and HALC. (2) Decoding strategy optimization, such as DoLA (Do-Layer Decoding) and VCD (Visual Contrast Decoding), which reduce hallucinations through multiple rounds of backtracking or attention guidance. (3) Instruction fine-tuning, which involves targeted training of the model on high-quality manually labeled data to enhance its ability to follow visual facts.
[0004] However, the aforementioned methods have significant limitations: post-processing and decoding methods typically rely on multi-stage inference or additional large models, significantly increasing inference latency and computational overhead. Instruction fine-tuning, on the other hand, heavily relies on large-scale, high-precision labeled data, resulting in high costs and limited generalization ability. Furthermore, recent research indicates that a fundamental cause of visual illusions lies in the presence of numerous redundant or noisy visual tokens in the input image; these irrelevant features interfere with the model's focus on key semantic content. Although existing works, such as FastV and LLaVA-PruMerge, attempt to prune tokens through attention weights or image-text similarity, their pruning strategies often employ fixed thresholds or rely on unreliable attention signals, making it difficult to adapt to the varying complexity of different images and lacking fine-grained suppression of feature-level redundancy.
[0005] Therefore, there is an urgent need for a lightweight, pluggable technical solution that does not require an additional inference stage, capable of collaboratively identifying and filtering redundant visual information at the feature and token levels while retaining key visual content aligned with text semantics, thereby significantly improving the factual consistency and anti-illusion capabilities of visual language models without sacrificing efficiency. Summary of the Invention
[0006] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention proposes a multimodal large language model anti-hallucination method, system, and device based on image token compression filtering. The aim is to efficiently suppress redundant visual information through a synergistic mechanism of feature-level compression and adaptive image token filtering, thereby solving the problems of insufficient accuracy and efficiency in existing multimodal large language model anti-hallucination methods.
[0007] To achieve the above objectives, according to one aspect of the present invention, a multimodal large language model anti-hallucination method based on image token compression filtering is provided, comprising the following steps: S1: Input an image and text, and encode the image and text into corresponding initial image tokens and initial text tokens respectively; S2: Input the initial image token into the multimodal information bottleneck module, perform feature-level compression, and output a compressed image token. The multimodal information bottleneck module includes a fully connected layer network, a normalization network, and an information compression module. The fully connected layer network is used to extract features of each initial image token. The normalization network is used to map the features of each initial image token to a gating parameter. The information compression module is used to fuse the initial image token and Gaussian noise using the gating parameter. The fully connected layer network is optimized using a multimodal information bottleneck objective function and a binary guided objective function. The multimodal information bottleneck objective function includes a compression term and a supervision term. The compression term is the upper bound of the mutual information between the compressed image token and the initial image token, and the supervision term is the lower bound of the mutual information between the compressed image token and the initial text token. The binary guided objective function is used to optimize the fully connected layer network so that the gating parameter tends to 0 or 1. S3: Construct a similarity graph of the compressed image token, divide the compressed image token into multiple clusters using clustering, identify redundant clusters based on the compression items corresponding to the compressed image tokens in each cluster, remove the compressed image tokens corresponding to the redundant clusters, and complete adaptive image token filtering; S4: Input the filtered and retained compressed image token and the initial text token into the multimodal large language model for autoregressive output.
[0008] Preferably, in step S2, the fully connected layer network includes several linear layers and activation functions; the number of linear layers is 4 to 8, and the activation function is tanh or ReLU; the normalization network is a sigmoid function.
[0009] Preferably, in step S2, the information compression module is generated in the following manner: ; in, Represented as the first n A compressed image token, Represented as the first n An initial image token, Represented as the first n The gating parameters corresponding to the features of the initial image token. Represented as Gaussian noise, . Preferably, in step S2, the multimodal information bottleneck objective function for:
[0010] in, For compression items, For monitoring items, As the balance coefficient, take 1×10 -5 ~1×10 -2 In the compression item, This is expressed as an average calculation. Represented as the initial image token. Represented as a compressed image token, This is represented as the conditional probability distribution of the compressed image token. This is represented as the probability distribution of Gaussian noise. Represented as KL divergence; in the supervision term, , These represent the initial number of image tokens and the initial number of text tokens, respectively. Represented as the first There are 1 initial text token, T, which represents the matrix transpose.
[0011] Preferably, in step S2, the binary guided loss function The expression is:
[0012] in, N The initial number of image tokens, Represented as gating parameters, Represented as a numerical stability constant; The value is 1×10 -12 ~1×10 -9 .
[0013] Preferably, in step S2, the fully connected layer network is jointly optimized using a multimodal information bottleneck objective function, a binary guided objective function, and a standard cross-entropy loss function.
[0014] Preferably, in step S3, the clustering is K-means clustering, DBSCAN clustering, or spectral clustering.
[0015] Preferably, redundant clusters are identified based on the compression items corresponding to the compressed image tokens in each cluster. Specifically, this involves calculating the average compression cost of the compression items corresponding to the compressed image tokens in each cluster, determining the minimum number of compression items corresponding to the compressed image tokens in each cluster, or confirming the median of the compression items corresponding to the compressed image tokens in each cluster. Then, the clusters are sorted according to the average compression cost, the minimum number of compression items, or the median of compression items, and at least one cluster located at the end of the sorting results is identified as a redundant cluster.
[0016] Preferably, step S3 specifically includes: constructing a similarity graph of the compressed image tokens, using spectral clustering to divide the compressed image tokens into multiple clusters, and calculating the average compression cost based on the compression terms corresponding to the compressed image tokens in each cluster; identifying the cluster with the smallest average compression cost as a redundant cluster, removing the compressed image tokens corresponding to the redundant clusters, and completing adaptive image token filtering.
[0017] According to another aspect of the present invention, a multimodal large language model anti-hallucination system based on image token compression filtering is provided, comprising: The input module is used to input images and text, and encode the images and text into corresponding initial image tokens and initial text tokens, respectively. A feature-level compression module, including a multimodal information bottleneck module, is used to input the initial image token into the multimodal information bottleneck module, perform feature-level compression, and output a compressed image token. The multimodal information bottleneck module includes a fully connected layer network, a normalization network, and an information compression module. The fully connected layer network is used to extract features of each initial image token, the normalization network is used to map the features of each initial image token to a gating parameter, and the information compression module is used to fuse the initial image token and Gaussian noise using the gating parameter. The fully connected layer network is optimized using a multimodal information bottleneck objective function and a binary guided objective function. The multimodal information bottleneck objective function includes a compression term and a supervision term. The compression term is the upper bound of the mutual information between the compressed image token and the initial image token, and the supervision term is the lower bound of the mutual information between the compressed image token and the initial text token. The binary guided objective function is used to optimize the fully connected layer network so that the gating parameter tends towards 0 or 1. An adaptive image token filtering module is used to construct a similarity graph of the compressed image tokens, divide the compressed image tokens into multiple clusters using clustering, identify redundant clusters based on the compression items corresponding to the compressed image tokens in each cluster, remove the compressed image tokens corresponding to the redundant clusters, and complete the adaptive image token filtering. The output module includes a multimodal large language model, which is used to input the filtered and retained compressed image token and the initial text token into the multimodal large language model for autoregressive output.
[0018] In summary, compared with the prior art, the above-described technical solutions conceived by this invention mainly possess the following technical advantages: 1. This invention provides a multimodal large language model anti-hallucination scheme based on image token compression filtering. It achieves this by dynamically compressing irrelevant visual signals at the feature level using a multimodal information bottleneck module, and implementing redundant token pruning at the token level to adapt to image complexity. These two approaches synergistically significantly improve anti-hallucination capabilities and effectiveness, i.e., enhancing POPE accuracy. Specifically, in the multimodal information bottleneck module, controllable Gaussian noise is injected into each image token, and compression gating parameters are learned. Feature-level compression is performed on the initial image tokens, while binary guided loss is used to encourage the gating parameters to approach 0 or 1, making the discrimination of redundant / key tokens clearer and improving model interpretability and filtering stability. In adaptive image token filtering, redundant clusters are identified through clustering and by leveraging compression terms in the fully connected layer network of the multimodal information bottleneck module. Since the compression terms act as dynamic thresholds, their adaptive learning during training in the multimodal information bottleneck module dynamically adjusts according to different input images, resulting in a synergistic effect between the continuous compression signal at the feature level and the discrete clustering structure at the token level. Furthermore, by performing feature-level compression and redundant token filtering on the input of this paper before inputting it into the multimodal large language model, without relying on auxiliary models or backtracking decoding, and without additional inference overhead, the inference efficiency is further improved.
[0019] 2. The multimodal information bottleneck objective function of this invention includes a compression term and a supervision term. By constraining the mutual information between the compressed image token and the initial image token, and maximizing the mutual information between the compressed image token and the text token, the model tends to retain the image information that contributes most to text inference and actively suppresses visual noise unrelated to the text. Furthermore, it can adjust the weight ratio between the compression term and the supervision term in the multimodal information bottleneck objective function, effectively preventing image tokens from being over-noised and ensuring that visual features highly relevant to text semantics are preserved.
[0020] 3. The present invention preferably uses a multimodal information bottleneck objective function, a binary guided objective function and a standard cross-entropy loss function for joint optimization. It comprehensively considers the accuracy of language generation, the effect of visual information compression and the ability to distinguish the importance of image tokens, so that the multimodal large language model can learn to adaptively filter, compress and utilize visual information that is highly related to the semantics of the text while ensuring the original language generation ability. Attached Figure Description
[0021] Figure 1The overall flowchart of the anti-hallucination method based on image token compression filtering for multimodal large language models provided by the present invention is shown below.
[0022] Figure 2 This is a framework diagram of a multimodal large language model anti-hallucination scheme based on image token compression filtering provided in an embodiment of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, 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 and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0024] To address the technical problems of existing visual language models being prone to visual illusions during generation, and the low inference efficiency of existing anti-illusion methods relying on additional large models or multi-stage decoding, this invention provides a multimodal large language model anti-illusion method and system based on image token compression filtering. The overall approach involves introducing a multimodal information bottleneck mechanism at the feature level and employing an adaptive spectral clustering pruning strategy at the token level to collaboratively suppress redundant visual information, thereby significantly improving the model's factual consistency without increasing the number of inference stages.
[0025] In one aspect of this invention, a multimodal large language model anti-hallucination method based on image token compression filtering is proposed, such as... Figure 1 As shown, the overall process includes the following steps: S1: Input image and text, and encode the image and text into corresponding initial image tokens and initial text tokens respectively; S2: The initial image token is input into the multimodal information bottleneck module, which performs feature-level compression on the initial image token and outputs a compressed image token. The multimodal information bottleneck module is a pre-trained model, including a fully connected layer network, a normalization network, and an information compression module. The fully connected layer network is used to extract the features of each initial image token, the normalization network is used to map the features of each initial image token to the corresponding gating parameters, and the information compression module is used to fuse the initial image token and Gaussian noise with the help of the gating parameters to output a compressed image token. The fully connected layer network is optimized using the multimodal information bottleneck objective function and the binary guided objective function. The multimodal information bottleneck objective function includes a compression term and a supervision term. The compression term is the upper bound of the mutual information between the compressed image token and the initial image token, and the supervision term is the lower bound of the mutual information between the compressed image token and the initial text token. The binary guided objective function is used to optimize the fully connected layer network so that the gating parameters tend to 0 or 1. S3: Construct a similarity graph of compressed image tokens, use clustering to divide the compressed image tokens into multiple clusters, identify redundant clusters based on the compression items corresponding to the compressed image tokens in each cluster, remove the compressed image tokens corresponding to the redundant clusters, and complete the adaptive image token filtering. S4: Input the filtered and retained compressed image tokens and the initial text tokens into the multimodal large language model for autoregressive output.
[0026] In one embodiment, in step S1, an image and text are input and encoded into corresponding initial image tokens and initial text tokens, respectively. Specifically, an input sample for a visual language task is obtained, such as a binary classification problem of "image + does an object exist?". The image is input to a pre-trained visual encoder (such as CLIP, ViT, Q-Former), and the output is... N Initial image token The text (question or instruction) is encoded using a tokenizer. M Initial text token ,in d For feature dimensions.
[0027] In one embodiment, in step S2, the fully connected layer network includes several linear layers and an activation function. The linear layers are Linear(…). In this formula, A and b For trainable parameters, x The features are input to a linear layer, typically with 4 to 8 layers; the activation function is tanh or ReLU. The activation function is ReLU, expressed as... ReLU ( x )= max ( 0 , x ), where in the formula x This represents the features output by the linear layer.
[0028] In one embodiment, in step S2, a normalization network is used to map the features of the initial image tokens output by the fully connected layer to the 0-1 range. The normalization network includes a sigmoid function: In this formula, x The features of the initial image tokens are represented as the output of the fully connected layer.
[0029] In one embodiment, in step S2, the information compression module is used to fuse the image token and Gaussian noise using gating parameters, specifically generated as follows: ; in, Represented as the first nA compressed image token, Represented as the first n An initial image token, Represented as the first n The gating parameters corresponding to the features of the initial image token. Represented as Gaussian noise, .when When, retain the characteristics of the initial image token; when At that time, Gaussian noise is used to replace the features of the initial image token to suppress irrelevant visual signals.
[0030] Furthermore, ;in, This is a fully connected layer network, such as an IB network consisting of four linear layers and activation functions; For normalized networks, such as the Sigmoid function.
[0031] In one embodiment, in step S2, the multimodal information bottleneck module is a pre-trained model set between the visual encoder and the multimodal large language model. It is used to compress information and filter semantics for image tokens. It achieves fine control of visual information flow by injecting controllable noise into the image tokens and learning the information retention weights corresponding to each image token.
[0032] Specifically, the training set for the multimodal information bottleneck module was trained by randomly sampling 5000 pairs of images and text, such as datasets containing images and their corresponding text descriptions, and question-answer pairs. During training, the original parameters of the large multimodal language model were kept frozen, and only the multimodal information bottleneck module was trained.
[0033] In one embodiment, the fully connected layer network is optimized using a multimodal information bottleneck objective function and a binary guided objective function.
[0034] The multimodal information bottleneck objective function constrains the mutual information between the compressed image token and the initial image token, while maximizing the mutual information between the compressed image token and the text token. This makes the model tend to retain the image information that contributes most to text reasoning and actively suppress visual noise that is irrelevant to the text.
[0035] Multimodal information bottleneck objective function for:
[0036] in, For compression items, For monitoring items, The balance coefficient; in the compression term, This is expressed as an average calculation. Represented as the initial image token. Represented as a compressed image token, This is represented as the conditional probability distribution of the compressed image token. This is represented as the probability distribution of Gaussian noise. Represented as KL divergence; in the supervised terms, , These represent the initial number of image tokens and the initial number of text tokens, respectively. Represented as the first There are 1 initial text token, T, which represents the matrix transpose.
[0037] Furthermore, β This term is used to adjust the weight ratio between the compression term and the supervision term in the multimodal information bottleneck objective function. Its essential function is to control the intensity of image token compression by the model, and its value ranges from 1×10. -5 ~1×10 -2 .when β When the parameter values are large, the model tends to compress visual information, thereby suppressing more redundant or noisy visual features; when... β When the parameter values are small, the model tends to retain visual information to avoid over-compression that could lead to the loss of key information. β When the value is 0.05, it can effectively prevent image tokens from being over-noised, ensuring that visual features that are highly relevant to the semantics of the text are preserved.
[0038] The binary guided objective function is used to constrain the gating coefficients corresponding to the image tokens to converge towards 0 or 1, enabling the information bottleneck module to form a clearer decision boundary between "preserving" and "suppressing" visual information. This significantly enhances the importance differentiation between different image tokens. A binary guided loss function is introduced. The expression is:
[0039] in, N The initial number of image tokens, Represented as gating parameters, It is expressed as a numerical stability constant.
[0040] Furthermore, Its purpose is to prevent numerical instability in logarithmic operations during the loss function calculation process; its value is 1×10. -12 ~1×10 -9 1×10 is preferred. -12 .
[0041] In one embodiment, the fully connected layer network employs a multimodal information bottleneck objective function, a binary guided objective function, and a standard cross-entropy loss function for joint optimization. A final total training loss is introduced to jointly optimize the multimodal information bottleneck module. This loss comprehensively considers language generation accuracy, visual information compression effectiveness, and image token importance discrimination ability, enabling the multimodal large language model to adaptively filter, compress, and utilize visual information highly relevant to text semantics while maintaining its original language generation capabilities. The final total training loss is expressed as:
[0042] in, This is expressed as the objective function for the multimodal information bottleneck. Represented as a binary guided loss function, This is expressed as the standard cross-entropy loss.
[0043] In one embodiment, step S3 is an adaptive token filtering process. Clustering is used to divide compressed image tokens into a preset number of clusters so that compressed image tokens in the same cluster have high similarity in the feature space. This can be K-means clustering, DBSCAN clustering, or spectral clustering.
[0044] In one embodiment, in step S3, a redundant cluster refers to the cluster identified in the adaptive token filtering process based on the compression items corresponding to the compressed image tokens in each cluster. This is done by calculating the average compression cost of the compression items corresponding to the compressed image tokens in each cluster, or finding the minimum number of compression items corresponding to the compressed image tokens in each cluster, or finding the median of compression items corresponding to the compressed image tokens in each cluster, and then sorting them according to the average compression cost, the minimum number of compression items, or the median of compression items. At least one or more clusters that are lowest in the sorting results are identified as redundant clusters.
[0045] In one embodiment, step S3 specifically includes: Compressed image token Based on this, where N is the number of image tokens, a compressed image token similarity graph is constructed, where... N Represented as the number of image tokens. Represented as a compressed image token: Calculate the cosine similarity adjacency matrix ,in This represents the i-th image token. This represents the transpose of a vector. Describe the Euclidean norm; construct the degree matrix. Calculate the normalized Laplace matrix. Where D is the degree matrix and W is the cosine similarity adjacency matrix; solve for... The former The eigenvectors corresponding to the smallest non-zero eigenvalues form a matrix. ;right Perform K-means clustering on the row vectors to obtain... token clusters ; For each cluster , computation cluster Average MIB compression cost of the compression term corresponding to the compressed image token: ,in, This represents the i-th compressed image token. Represents the i-th initial image token; recognition The smallest redundant cluster (That is, the compression cost is the lowest and the amount of information is the least), remove all compressed image tokens in this cluster, and retain the compressed image tokens of the remaining clusters to form the image. .
[0046] In one embodiment, in step S4, the multimodal large language model includes MiniGPT-4 and LLaVA-1.5 multimodal large language models.
[0047] In one embodiment, in step S4, the filtered visual representation is input to the text token language decoder to generate an output.
[0048] Will and The concatenated text is input into a language decoder, which generates the answer text via autoregression. Because redundant visual signals have been effectively suppressed, the model focuses more on key visual regions that are semantically aligned with the text, thus significantly reducing the illusion.
[0049] This method is integrated into any multimodal large language model architecture as a plug-in, without modifying the original model backbone structure or introducing an additional inference stage, and has good versatility and deployment friendliness.
[0050] The method of this invention is applicable to multimodal tasks, including but not limited to generative tasks such as image description, visual question answering, and multimodal dialogue.
[0051] In another aspect of the invention, a multimodal large language model anti-hallucination system based on image token compression filtering is proposed, comprising: The input module is used to input images and text, and encodes the images and text into corresponding initial image tokens and initial text tokens, respectively. The feature-level compression module, including the multimodal information bottleneck module, is used to input the initial image tokens into the multimodal information bottleneck module, perform feature-level compression on the initial image tokens, and output compressed image tokens with extracted features. The multimodal information bottleneck module is a pre-trained network model, including a fully connected layer network, a normalization network, and an information compression module. The fully connected layer network is used to extract the features of each initial image token, the normalization network is used to map the features of each initial image token to gating parameters, and the information compression module is used to fuse the image tokens and Gaussian noise with the help of the gating parameters. The fully connected layer network is optimized using a multimodal information bottleneck objective function and a binary guided objective function. The multimodal information bottleneck objective function includes a compression term and a supervision term. The compression term is the upper bound of the mutual information between the compressed image tokens and the initial image tokens, and the supervision term is the lower bound of the mutual information between the compressed image tokens and the initial text tokens. The binary guided objective function is used to optimize the fully connected layer network so that the gating parameters tend to 0 or 1. The image token filtering module is used to construct a similarity graph of compressed image tokens, divide the compressed image tokens into multiple clusters using clustering, identify redundant clusters based on the compression items corresponding to the compressed image tokens in each cluster, remove the compressed image tokens corresponding to the redundant clusters, and complete adaptive image token filtering. The output module, including a multimodal large language model, is used to input the filtered and retained compressed image tokens and the initial text tokens into the multimodal large language model for autoregressive output.
[0052] The following example illustrates a structure constructed using the method described in this invention, such as... Figure 2 The hallucination mitigation effect of the multimodal large language model anti-hallucination scheme based on image token compression filtering is shown. The specific schemes involved in feature-level compression (multimodal information bottleneck module) and adaptive image token filtering are explained in [the document / section]. Figure 2 middle.
[0053] Experimental Setup: To verify the effectiveness of the method of this invention in alleviating the illusion of multimodal large language models in image understanding, this invention was evaluated on two 7B multimodal large language models, LLaVA-1.5 and MiniGPT-4, using the POPE dataset. The structure of the invention is as follows: Figure 2 As shown, the relevant parameters in the method are: the number of clusters in the MiniGPT-4 model is... =5 clusters, the number of clusters in the LLaVA-1.5 model is k =9 clusters β =0.05, =10 -12The training set for the multimodal information bottleneck module was randomly sampled from the LLaVA-150k training dataset, consisting of 5,000 image-text pairs, including datasets containing images and their corresponding text descriptions, and question-answer pairs. During training, the parameters of the original multimodal large language model were frozen, and training was performed only on the multimodal information bottleneck module. Furthermore, by jointly optimizing the multimodal information bottleneck objective function, cross-entropy loss function, and binary guided loss function, the module learns to adaptively compress and preserve visual information under different image and text conditions.
[0054] Specifically, POPE models the evaluation of hallucinations as a binary classification task for object presence. An image and a cue (whether object X exists in the image) are input into a multimodal large language model to obtain a result (yes / no). The complete POPE evaluation includes three subsets: Random (representing randomly sampling objects or regions from the image and constructing targets unrelated to the image content or with a high probability of non-existence, used to test whether the model will produce hallucinations in the absence of real visual evidence), Popular (representing constructing questions based on high-frequency or common targets in the dataset, even if these targets do not exist in the current image, used to evaluate whether the model is affected by language priors and common sense biases, thus producing hallucinations), and Adversarial (representing using carefully designed adversarial questions or targets that are semantically highly relevant to the image content but do not actually exist, used to rigorously examine the model's anti-hallucination ability in complex and misleading scenarios). Accuracy is used as the evaluation metric, i.e., the model's accuracy in binary classification judgments such as "does the object / attribute exist?". As an evaluation indicator ( The higher the value, the stronger the method's ability to combat hallucinations.
[0055] To evaluate the effectiveness of the method of this invention in alleviating hallucinations, it was integrated into MiniGPT-4 and evaluated on the POPE dataset. As shown in Table 1, it was observed that although the method of this invention brought consistent performance improvements in most evaluation settings (the method settings corresponding to the experiments in Table 1 include Greedy, Beam Search, DoLA, VCD, HALC, and Nullu), the better accuracy of this invention indicates that it can effectively alleviate the hallucination problem in the visual-language task.
[0056] Table 1: Experimental results on the POPE dataset. All baseline methods are implemented based on the MiniGPT-4 model.
[0057] Using LLaVA-1.5 as the base model, a comparative study of inference speed and accuracy was conducted on the POPE dataset. All experiments were performed on NVIDIA L40 GPUs to ensure a consistent and controlled evaluation environment. As shown in Table 2, this invention demonstrates excellent performance in both efficiency and effectiveness, reducing the inference time per image-text token to 0.081 seconds—approximately 3.5 times faster than HALC (0.283 seconds)—while simultaneously reducing the average inference time for POPE... The score improved by 9.94%, and Time (s / token) represents the time consumed by the model to generate each text sequence. These results demonstrate that, compared to typical decoder-based methods, this invention can suppress hallucinations more effectively while significantly reducing resource consumption.
[0058] Table 2: Comparison of inference speed and POPE between different methods For score comparisons, all baseline methods were implemented based on the LLaVA-1.5 model.
[0059] Comparative experiments were conducted using LLaVA-1.5 as the base model for image token pruning baseline methods, and the results were compared on the POPE dataset with the POPE average. The score is used as the evaluation metric. Baseline methods for image token pruning include Simignore, PruMerge, and FastV, all evaluated under the same base model and the same image token retention ratio (i.e., retain k% image tokens). As shown in Table 3, the advantages of this invention become particularly evident as the retention ratio decreases (60%–80%), indicating that this invention performs better under high compression ratio conditions.
[0060] Table 3: Performance Comparison Under Different Image Token Retention Ratios
[0061] In further embodiments, experiments were conducted on the POPE dataset using LLaVA-1.5-7B as the baseline model. During the training phase, only 5,000 image-text pairs randomly sampled from LLaVA-150K were used to fine-tune the VIBRA module, and the backbone model parameters were frozen. Experimental results show that the method of this invention outperforms mainstream methods such as HALC and Nullu on the POPE-Average F1 score; at the same time, the inference speed reaches 0.081 seconds / word, which is about 3.5 times that of HALC (0.283 seconds / word), fully demonstrating the dual advantages of this method in terms of effectiveness and efficiency. Based on the above experimental results, it is concluded that integrating the method of this invention into the MiniGPT-4 and LLaVA-1.5 models and conducting a systematic evaluation on the POPE dataset verifies its significant advantages in hallucination problems in hallucination models. In addition, it is also verified that while maintaining or even improving the average score of POPE, the inference overhead is significantly reduced. The above results fully demonstrate that this invention achieves a balance between effectiveness and computational efficiency and has outstanding practical application value.
[0062] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multimodal large language model anti-hallucination method based on image token compression filtering, characterized in that, Includes the following steps: S1: Input an image and text, and encode the image and text into corresponding initial image tokens and initial text tokens respectively; S2: Input the initial image token into the multimodal information bottleneck module, perform feature-level compression, and output the compressed image token; The multimodal information bottleneck module includes a fully connected layer network, a normalization network, and an information compression module. The fully connected layer network is used to extract features of each initial image token. The normalization network is used to map the features of each initial image token to a gating parameter. The information compression module is used to fuse the initial image token and Gaussian noise using the gating parameter. The fully connected layer network is optimized using a multimodal information bottleneck objective function and a binary guided objective function. The multimodal information bottleneck objective function includes a compression term and a supervision term. The compression term is the upper bound of the mutual information between the compressed image token and the initial image token, and the supervision term is the lower bound of the mutual information between the compressed image token and the initial text token. The binary guided objective function is used to optimize the fully connected layer network so that the gating parameter tends towards 0 or 1. S3: Construct a similarity graph of the compressed image token, divide the compressed image token into multiple clusters using clustering, identify redundant clusters based on the compression items corresponding to the compressed image tokens in each cluster, remove the compressed image tokens corresponding to the redundant clusters, and complete adaptive image token filtering; S4: Input the filtered and retained compressed image token and the initial text token into the multimodal large language model for autoregressive output.
2. The anti-hallucination method based on image token compression filtering using a multimodal large language model according to claim 1, characterized in that, In step S2, the fully connected layer network includes several linear layers and activation functions; the number of linear layers is 4 to 8, and the activation function is tanh or ReLU; the normalization network is the Sigmoid function.
3. The anti-hallucination method based on image token compression filtering using a multimodal large language model according to claim 1, characterized in that, In step S2, the information compression module generates the information as follows: ; in, Represented as the first n A compressed image token, Represented as the first n An initial image token, Represented as the first n The gating parameters corresponding to the features of the initial image token. Represented as Gaussian noise, .
4. The anti-hallucination method based on image token compression filtering using a multimodal large language model according to claim 1, characterized in that, In step S2, the multimodal information bottleneck objective function for: in, For compression items, For monitoring items, As the balance coefficient, take 1×10 -5 ~1×10 -2 In the compression item, This is expressed as an average calculation. Represented as the initial image token. Represented as a compressed image token, This is represented as the conditional probability distribution of the compressed image token. This is represented as the probability distribution of Gaussian noise. Represented as KL divergence; in the supervision term, , These represent the initial number of image tokens and the initial number of text tokens, respectively. Represented as the first There are 1 initial text token, T, which represents the matrix transpose.
5. The anti-hallucination method based on image token compression filtering using a multimodal large language model according to claim 1, characterized in that, In step S2, the binary guided loss function The expression is: in, N The initial number of image tokens, Represented as gating parameters, Represented as a numerical stability constant; The value is 1×10 -12 ~1×10 -9 .
6. The anti-hallucination method based on image token compression filtering using a multimodal large language model according to claim 1, characterized in that, In step S2, the fully connected layer network is jointly optimized using a multimodal information bottleneck objective function, a binary guided objective function, and a standard cross-entropy loss function.
7. The anti-hallucination method based on image token compression filtering using a multimodal large language model according to claim 1, characterized in that, In step S3, the clustering is K-means clustering, DBSCAN clustering, or spectral clustering.
8. The anti-hallucination method based on image token compression filtering using a multimodal large language model according to claim 1, characterized in that, In step S3, redundant clusters are identified based on the compression items corresponding to the compressed image tokens in each cluster. Specifically, this includes calculating the average compression cost of the compression items corresponding to the compressed image tokens in each cluster, determining the minimum number of compression items corresponding to the compressed image tokens in each cluster, or confirming the median of the compression items corresponding to the compressed image tokens in each cluster. Then, the clusters are sorted according to the average compression cost, the minimum number of compression items, or the median of compression items, and at least one cluster located at the end of the sorting results is identified as a redundant cluster.
9. The anti-hallucination method for multimodal large language models based on image token compression filtering according to claim 7, characterized in that, Step S3 specifically includes: constructing a similarity graph of the compressed image tokens, using spectral clustering to divide the compressed image tokens into multiple clusters, and calculating the average compression cost based on the compression terms corresponding to the compressed image tokens in each cluster; identifying the cluster with the smallest average compression cost as a redundant cluster, removing the compressed image tokens corresponding to the redundant clusters, and completing adaptive image token filtering.
10. A multimodal large language model anti-hallucination system based on image token compression filtering, characterized in that, include: The input module is used to input images and text, and encode the images and text into corresponding initial image tokens and initial text tokens, respectively. The feature-level compression module includes a multimodal information bottleneck module, which is used to input the initial image token into the multimodal information bottleneck module, perform feature-level compression, and output a compressed image token; The multimodal information bottleneck module includes a fully connected layer network, a normalization network, and an information compression module. The fully connected layer network is used to extract features of each initial image token. The normalization network is used to map the features of each initial image token to a gating parameter. The information compression module is used to fuse the initial image token and Gaussian noise using the gating parameter. The fully connected layer network is optimized using a multimodal information bottleneck objective function and a binary guided objective function. The multimodal information bottleneck objective function includes a compression term and a supervision term. The compression term is the upper bound of the mutual information between the compressed image token and the initial image token, and the supervision term is the lower bound of the mutual information between the compressed image token and the initial text token. The binary guided objective function is used to optimize the fully connected layer network so that the gating parameter tends towards 0 or 1. An adaptive image token filtering module is used to construct a similarity graph of the compressed image tokens, divide the compressed image tokens into multiple clusters using clustering, identify redundant clusters based on the compression items corresponding to the compressed image tokens in each cluster, remove the compressed image tokens corresponding to the redundant clusters, and complete the adaptive image token filtering. The output module includes a multimodal large language model, which is used to input the filtered and retained compressed image token and the initial text token into the multimodal large language model for autoregressive output.