Source-linked AI summary
Hallucination Augmented Contrastive Learning for Multimodal Large Language Model
Chaoya Jiang, Haiyang Xu, Mengfan Dong, Jiaxing Chen, Wei Ye, Ming Yan, Qinghao Ye, Ji Zhang, Fei Huang, Shikun Zhang
TL;DR
MLLMs hallucinate because visual and textual representations remain poorly aligned and hallucinating text is entangled with non-hallucinating text. HACL applies cross-modal contrastive learning with hallucinative captions as hard negatives, reducing hallucinations and improving benchmark performance, including 29% higher MMhal-Bench and 11% higher MME for LLaVA. The method assumes an MLLM with a vision encoder, learnable interface, and decoder-only LLM, and is applied during first-stage pretraining.
Problem
MLLMs generate erroneous or fabricated information because visual-textual representations have a modality gap and hallucinating and non-hallucinating texts are entangled.
Method
HACL applies cross-modal contrastive learning, using GPT-4-generated hallucinative captions as hard negatives while optimizing the learnable interface.
Results
29% improvement on MMhal-Bench and 11% improvement on MME were reported for LLaVA equipped with HACL.
Takeaways & Limitations
HACL reduces hallucination occurrence and improves MLLM performance across multiple benchmark evaluations.
Takeaways & Limitations
The method assumes an MLLM composed of a vision encoder, learnable interface, and decoder-only LLM.
Abstract
from arXiv · showhide
Multi-modal large language models (MLLMs) have been shown to efficiently integrate natural language with visual information to handle multi-modal tasks. However, MLLMs still face a fundamental limitation of hallucinations, where they tend to generate erroneous or fabricated information. In this paper, we address hallucinations in MLLMs from a novel perspective of representation learning. We first analyzed the representation distribution of textual and visual tokens in MLLM, revealing two important findings: 1) there is a significant gap between textual and visual representations, indicating unsatisfactory cross-modal representation alignment; 2) representations of texts that contain and do not contain hallucinations are entangled, making it challenging to distinguish them. These two observations inspire us with a simple yet effective method to mitigate hallucinations. Specifically, we introduce contrastive learning into MLLMs and use text with hallucination as hard negative examples, naturally bringing representations of non-hallucinative text and visual samples closer while pushing way representations of non-hallucinating and hallucinative text. We evaluate our method quantitatively and qualitatively, showing its effectiveness in reducing hallucination occurrences and improving performance across multiple benchmarks. On the MMhal-Bench benchmark, our method obtains a 34.66% /29.5% improvement over the baseline MiniGPT-4/LLaVA. Our code is available on https://github.com/X-PLUG/mPLUG-HalOwl/tree/main/hacl.
1. Introduction
MLLMs integrate visual information through learned interfaces but remain prone to hallucinations. HACL addresses this by aligning visual and textual representations and separating hallucination-containing text, improving benchmark performance.
- Motivation: MLLMs use learned interfaces to map visual information into LLMs and support multimodal tasks.These interfaces include learnable query tokens or projection-based linear models.
- Problem: MLLMs hallucinate by generating erroneous or fabricated information that does not match the visual input.The paper treats this limitation as a representation-learning problem.
- Problem: Visual and textual representations retain a modality gap, while hallucinating and non-hallucinating text representations remain entangled.This makes minor object or attribute errors difficult to distinguish from typical hallucinative expressions.
- Method: HACL uses hallucinative text as hard negatives, pulling non-hallucinating text toward visual samples and pushing it away from hallucinative text.The method introduces hallucination-augmented cross-modal contrastive learning into MLLMs.
- Results: 29% improvement on MMhal-Bench and 11% improvement on MME were reported for LLaVA equipped with HACL.The experiments also report reduced hallucination occurrence and improvements across multiple benchmark evaluations.
2. Related Work
Related work covers multimodal foundation-model architectures and prior hallucination-mitigation strategies. HACL is presented alongside contrastive-learning-based multimodal alignment and methods using constrained instructions or artificial data.
- Multimodal Large Language Foundation Models: Multimodal foundation models align vision and language through gated cross-attention, direct visual-feature projection, or query-former-based compression.Examples include Flamingo, PaLM-E, LLaVA, Shikra, and BLIP-2.
- Multimodal Large Language Foundation Models: Directly incorporating visual features can create lengthy visual sequences, motivating approaches such as BLIP-2’s Q-former.
- Contrastive Learning: HACL uses image-to-text contrastive learning with GPT-4-generated hallucinative captions as hard negative samples.
- Hallucination Mitigation: Prior hallucination-mitigation methods constrain instruction length or construct counterfactual instructions, but shorter instructions may reduce description detail.
3. Method
HACL refines the MLLM interface with cross-modal contrastive learning, using generated hallucinative captions as hard negatives to separate faithful and hallucinative text representations. It is incorporated during first-stage pretraining before instruction-only fine-tuning.
- Cross-modal contrastive learning: HACL refines the learnable interface by aligning visual representations with ground-truth text while separating them from hallucinative text.The method applies cross-modal contrastive learning to the interface that maps visual information into the LLM representation space.
- Cross-modal contrastive learning: Visual and paired-caption token sequences are separately processed through the LLM to obtain global semantic representations for image-text contrastive learning.An <EOS> representation is appended to each modality sequence before the LLM produces the final representations.
- Cross-modal contrastive learning: The contrastive objective compares image and caption representations within a batch using image-to-text and text-to-image losses.The method introduces the contrastive strategy after obtaining global representations for the image and its ground-truth caption.
- Hallucinative caption generation: GPT-4 generates hard-negative captions by adding image-inconsistent or absent elements, ranging from object-presence errors to incorrect quantities, properties, or locations.The generated captions are designed to resemble hallucinations produced by MLLMs while remaining similar to the original caption in content and length.
- Hallucination-augmented contrastive learning: HACL treats each generated hallucinative caption as a negative sample in image-text contrastive learning while leaving the text-to-image loss unchanged.The hallucinative caption representation is computed using the same approach as the original caption before being added to the image-to-text objective.
- Training paradigm: HACL is added during first-stage pretraining to optimize the interface, followed by second-stage fine-tuning using only instructional data.The first-stage objective combines the text-generation loss with the contrastive losses.
4. Experiments
Experiments evaluate HACL on hallucination, visual question answering, and zero-shot multimodal benchmarks, including ablations of contrastive learning and hallucination augmentation. Across these evaluations, HACL improves hallucination-related and visual-comprehension performance, while activating the LLM can cause a substantial decline.
- Evaluation setup: HACL evaluation covers MMHal-Bench, POPE, VQA, MME, MMBench, MM-Vet, and SEED-Bench across multiple MLLM baselines.The experiments apply HACL to MiniGPT-4, LLaVA, and LLaVA1.5, with comparisons to other multimodal models.
- Hallucination benchmarks: HACL significantly improves MMHal-Bench performance for MiniGPT-4, LLaVA, and LLaVA1.5, with LLaVA-HACL also outperforming LLaVA-RLHF.MMHal-Bench uses GPT-4 to evaluate overall score and hallucination rate.
- Hallucination benchmarks: 17.8%: LLaVA-HACL’s average F1 score increase over LLaVA on POPE, while its Yes ratio decreases from 99.55 to 48.25.LLaVA1.5-HACL also achieves state-of-the-art performance on POPE.
- Visual comprehension: LLaVA-HACL outperforms LLaVA across all evaluated VQA datasets in consistency and accuracy.LLaVA1.5-HACL performs better than LLaVA1.5 on general VQA and zero-shot VQA tasks.
- Visual comprehension: 581.67 to 653.94: LLaVA’s MME score improves after HACL, while all three evaluated models improve across multiple multimodal benchmarks.The reported zero-shot evaluations include MME, MMBench, MM-Vet, and SEED-Bench.
- Ablation study: Hallucinative captions produce a marked enhancement beyond contrastive learning alone on hallucination benchmarks, with analogous gains on MME and VQA.The ablation attributes the improvement to using hallucinative captions as hard negatives that divert visual representations from hallucinated and other incorrect text.
- Ablation study: Activating the LLM causes a significant performance decline, whereas activating the visual encoder yields a modest performance boost.The authors hypothesize that low-quality pretraining data and additional contrastive tasks contribute to catastrophic forgetting, while visual-encoder optimization improves alignment.
- Visualization: Contrastive learning reduces the modality gap but does not separate hallucination and ground-truth distributions without hallucination augmentation.With HACL, the modality gap decreases and hallucination samples become significantly more distant from ground-truth samples.
5. Conclusion
HACL addresses MLLM hallucinations by improving visual-textual representation alignment through contrastive learning with hallucinative captions as hard negatives. Experiments show reduced hallucinations and improved benchmark performance.
- HACL improves alignment between visual and textual representations to address hallucinations in MLLMs.
- HACL applies contrastive learning to projected text and visual token sequences, using hallucinative captions as hard negative samples.
- HACL reduces hallucination occurrence while enhancing MLLM performance in benchmark evaluations.