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 · DOI

Abstract

Multimodal Large Language Models (MLLMs) such as LLaVA and MiniGPT-4 demonstrate remarkable capabilities in integrating visual and textual information. However, they are prone to "hallucinations"—generating descriptions of objects or attributes not present in the input image. This paper introduces Hallucination Augmented Contrastive Learning (HACL), a method designed to mitigate this issue by improving the internal representation alignment between modalities. By leveraging GPT-4 to generate semantically similar but factually incorrect "hard negative" captions, HACL trains models to distinguish between truthful descriptions and plausible hallucinations. Experimental results show significant improvements in faithfulness across multiple benchmarks, including a 29% gain on MMHal-Bench for LLaVA.

Introduction

While MLLMs have advanced rapidly, the persistent issue of hallucination remains a significant barrier to their reliability. Previous research often treats hallucination as a generation-time failure. However, this work posits that hallucination is fundamentally a representation problem. Analysis of existing models reveals two core issues:

  1. The Modality Gap: Visual and textual representations reside in disparate regions of the model's high-dimensional embedding space, hindering effective alignment.
  2. Representation Entanglement: The internal representations of ground-truth captions and hallucinative captions are often indistinguishable, meaning the model lacks the representational clarity to separate fact from fiction.

Methodology: Hallucination Augmented Contrastive Learning (HACL)

To address these representational deficiencies, the authors propose HACL, a two-stage training paradigm designed to "untangle" the embedding space.

The HACL framework utilizes GPT-4 generated hard negatives and a two-stage training paradigm to align visual and textual representations.

The HACL approach consists of three primary components:

  1. Hard Negative Generation: GPT-4 is employed to modify ground-truth captions, intentionally introducing hallucinations related to object counts, colors, or relationships. These "hard negatives" are semantically close to the truth, forcing the model to learn finer-grained distinctions.
  2. Contrastive Learning Objective: During training, the model is optimized to minimize the distance between image representations and their corresponding ground-truth captions (positives) while maximizing the distance from both random captions (standard negatives) and the GPT-4 generated fake captions (hard negatives).
  3. Interface Refinement: The training specifically targets the "interface" or projection layer that bridges the vision encoder and the language model. This focus ensures that visual tokens are accurately translated into the LLM's semantic space.

Experimental Evaluation and Results

The effectiveness of HACL was evaluated using a variety of datasets, including subsets of LAION (10M), Conceptual Captions (CC3M/CC12M), and SBU. The HACL method yielded impressive improvements across the board:

  • MMHal-Bench: HACL improved LLaVA’s overall score by 29% and MiniGPT-4’s by 34.6%.
  • POPE Benchmark: On the "Adversarial" subset, LLaVA-HACL saw its F1 score jump by 17.8%, while the "Yes ratio" (a proxy for over-confidence in hallucinations) dropped from 99.55 to 48.25.
  • General Intelligence: On the MME benchmark, LLaVA-HACL improved from 502.82 to 562.58, proving that better visual-textual alignment boosts overall reasoning capabilities.

Representation Analysis

The impact of HACL is most visible in the model's internal state. 3D visualizations of the representation space demonstrate a clear shift before and after the application of HACL.

Visualization of the representation space showing the reduction of the modality gap and the separation of truth/hallucination clusters after HACL, alongside performance improvements on MMHal-Bench and MME.

Before HACL, hallucinative and ground-truth captions form an overlapping, entangled cluster. After HACL, the "modality gap" between images and text is significantly reduced, and the clusters for truth and hallucination become distinct. This separation allows the model to more reliably select factual descriptions during inference.

Discussion and Limitations

While HACL represents a significant step forward, several challenges remain. The reliance on GPT-4 for generating high-quality hard negatives introduces substantial computational and financial costs, limiting the scale at which this data can be produced. Furthermore, the authors observed "catastrophic forgetting" when attempting to fine-tune the entire LLM during the alignment phase; consequently, HACL focuses primarily on the interface layer to preserve general language skills. Future work will explore more efficient methods for generating hard negatives and the scalability of HACL to even larger model architectures (e.g., 13B+ parameters).

Summary updated

BibTeX
@misc{jiang2023hallucination,
  author = {Chaoya Jiang and Haiyang Xu and Mengfan Dong and Jiaxing Chen and Wei Ye and Ming Yan and Qinghao Ye and Ji Zhang and Fei Huang and Shikun Zhang},
  title = {{Hallucination Augmented Contrastive Learning for Multimodal Large Language Model}},
  year = {2023},
  eprint = {2312.06968},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.06968},
}
Figure