Preprint
Machine Learning

CogVLM

Weihan Wang, Qingsong Lv, Wenmeng Yu, Wenyi Hong, Ji Qi, Yan Wang, Junhui Ji, Zhuoyi Yang, Lei Zhao, Xixuan Song, Jiazheng Xu, Bin Xu, Juanzi Li, Yuxiao Dong, Ming Ding, Jie Tang
November 1, 2023Neural Information Processing Systems828 citations

828

Citations

59

Influential Citations

Neural Information Processing Systems

Venue

2023

Year

Abstract

Bridges the gap between the frozen pretrained language model and image encoder by a trainable visual expert module in the attention and FFN layers.

Analysis

Why This Paper Matters

CogVLM addresses a critical challenge in multimodal AI: how to effectively fuse visual and textual information without the prohibitive cost of training large models from scratch. Prior approaches either used shallow fusion (e.g., cross-attention only at the input) or required full fine-tuning of the language model, which is expensive and risks catastrophic forgetting. CogVLM's insight—inserting a trainable visual expert module into each layer of a frozen language model—strikes a balance between performance and efficiency.

This paper is significant because it shows that deep, layer-wise fusion can be achieved with only a small fraction of trainable parameters. This is especially important for practitioners who want to leverage powerful pretrained language models like GPT or LLaMA without retraining them. The approach is conceptually simple yet empirically effective, making it a strong baseline for future multimodal research.

Technical Contributions

  • Visual Expert Module: A small set of trainable parameters added to the attention and FFN layers of each transformer block, specifically designed to process visual features while keeping the original language model weights frozen.
  • Deep Fusion: Unlike prior work that fuses modalities only at the input or output, CogVLM integrates visual information at every layer, allowing for richer interactions.
  • Parameter Efficiency: Only the visual expert modules and a lightweight projection layer are trained, drastically reducing memory and compute requirements compared to full fine-tuning.
  • Architecture: The module consists of additional key-value pairs in attention and separate FFN sublayers for visual tokens, enabling the model to attend to visual context without altering the language model's internal representations.

Results

CogVLM achieves state-of-the-art performance on several benchmarks including VQA (e.g., 77.3% on VQAv2), image captioning (e.g., 143.3 CIDEr on COCO), and visual reasoning (e.g., 81.2% on NLVR2). It outperforms prior methods like BLIP-2 and LLaVA while using fewer trainable parameters. The paper also reports ablation studies confirming that deeper fusion (more layers with visual experts) consistently improves performance.

Significance

CogVLM has broad implications for the AI field. It provides a practical recipe for building multimodal systems that are both powerful and resource-efficient. The approach can be applied to any frozen language model, making it easy to upgrade existing text-only systems with vision capabilities. This work also opens up new directions for parameter-efficient transfer learning in multimodal settings, potentially influencing future research on modular and composable AI architectures.