Improving Visual Commonsense in Language Models via Multiple Image Generation

Guy Yariv, Idan Schwartz, Yossi Adi, Sagie Benaim · Submission to ICLR 2025 · Rejected

TL;DR

Standard large language models (LLMs) struggle with physical and visual commonsense (such as object colors, shapes, and sizes), while vision-language models (VLMs) often suffer performance drops on pure text reasoning. To solve this, vLMIG augments frozen LLMs by generating multiple synthetic images of an input prompt at inference and merging their predictions through a lightweight late-fusion attention layer weighted by CLIP alignment scores. This setup significantly boosts visual commonsense without degrading—and often slightly improving—text-based commonsense and reading comprehension.

What Problem Does This Paper Address?

Humans naturally draw on visual experience when reasoning about everyday concepts (e.g., “What is the typical color of an orangutan's face?” or “Is a sheep larger than a sofa?”). Because LLMs are trained solely on text, they frequently stumble on these basic physical and perceptual questions.

Conversely, Vision-Language Models (VLMs) excel at visual tasks but frequently exhibit degraded performance on non-visual NLP benchmarks—often due to over-relying on visual inputs or suffering from catastrophic forgetting during multimodal fine-tuning. Existing visually-augmented language models (VaLMs) attempt to bridge this gap, but many depend on external image retrieval databases, inject visual tokens early in the network (disrupting text representations), or rely on a single image that may be noisy or uninformative.

Methods

vLMIG (Visual Language Models via Multiple Image Generation) introduces a dual approach spanning architecture and inference:

  1. Frozen Foundation Models with Late-Fusion Attention:
  2. Both the base LLM and the vision encoder (CLIP-ViT-B/32) remain completely frozen.
  3. An image is encoded and mapped via a trainable two-layer MLP Visual Token Projector (VTP) into pseudo-text embeddings.
  4. A trainable Late Fusion Attention Layer (LFAL) is inserted directly before the final prediction head. The query ($Q$) comes from the LLM’s text representation, while keys ($K$) and values ($V$) are formed by concatenating the visual pseudo-tokens and text tokens along the sequence dimension.
  5. Multi-Image "Committee" at Inference:
  6. At test time, no real images exist. vLMIG feeds sentences from the input prompt into a fast diffusion model (SDXL-Turbo) using different seeds to generate $k$ candidate images.
  7. Each generated image produces a next-token probability distribution via the late-fusion layer.
  8. The final prediction is an ensemble weighted by each image's normalized text-image CLIP similarity score, blended with the purely text-conditioned LLM output. If the generated images are low-quality or irrelevant, the model falls back safely to text-only reasoning.
Text Prompt ──► Pre-trained LLM (Frozen) ──┐
                                            ├──► Late Fusion Attention ──► Vocabulary Logits
Text Prompt ──► SDXL-Turbo ──► CLIP Vision ─┘    (Ensembled over k images + text-only)
                (k images)     Encoder (Frozen)

Datasets

  • Training Data:
  • Visual Genome Regions (5.4M images with localized descriptions).
  • LAION-220K (220k captioned images from LVIS).
  • Wikitext-103-raw-v1 (2% sampled to generate paired synthetic images to simulate inference conditions).
  • MS COCO (used for specific controlled baseline comparisons).
  • Evaluation Benchmarks:
  • Object Commonsense: Zero-shot benchmarks assessing color, shape, and size: Memory Color, Color Terms, ViComTe Shape, and Relative Size.
  • Visual Commonsense: ImageNetVC (over 4,076 QA pairs across color, shape, material, component, and general categories).
  • Commonsense Reasoning (Text-only): PIQA, SIQA, HellaSwag, WinoGrande, ARC (Easy & Challenge), OpenBookQA, and CommonsenseQA.
  • Reading Comprehension (Text-only): BoolQ, SQuAD 2.0, and QuAC.

Key Insights and Ideas

  • Late Fusion Protects Pure Text Capabilities: Previous approaches inject visual tokens into early transformer layers, corrupting the delicate linguistic geometry of pretrained LLMs. Fusing vision once at the very end (right before the logit projection) preserves textual reasoning while supplying perceptual context when relevant.
  • Aggregating Multiple Visual Hypotheses Prevents Hallucination: A single generated image may be flawed or misleading. Sampling $k$ diverse images provides a consensus mechanism.
  • CLIP Alignment Acts as an Epistemic Gate: Weighting predictions by text-image CLIP scores allows vLMIG to downweight poor image generations and naturally defer to the unmodified language model when visual grounding is weak.
  • Avoiding the VLM Trade-Off: Standard VLMs (e.g., BLIP-2, Llava-Next) pay a steep penalty on standard text benchmarks to gain visual understanding. vLMIG circumvents this entirely.

Key Results

  • Object Commonsense Gains:
  • On GPT-2, vLMIG improves Memory Color accuracy from 32.4% to 72.5% and Color Terms from 34.6% to 69.2%, beating dedicated retrieval models like VaLM ($k=8$: 58.6% and 50.2%).
  • On BERT, vLMIG achieves 74.5% on Memory Color (vs. 31.6% base BERT and 64.1% for X-adapter).
  • Scaling to Modern LLMs:
  • Llama3-8B: Improves ImageNetVC visual commonsense from 52.0% to 55.0%, while slightly improving pure text commonsense reasoning (72.0% $\rightarrow$ 72.9%) and maintaining reading comprehension (57.9% $\rightarrow$ 58.0%).
  • Contrast with VLMs: On Vicuna-7B, Llava-Next increases visual commonsense (43.5% $\rightarrow$ 49.3%) but drops textual commonsense reasoning from 56.6% to 53.7% and reading comprehension from 57.5% to 54.7%. In contrast, vLMIG achieves 47.6% visual commonsense while raising text commonsense to 56.8% and reading comprehension to 57.9%.
  • Ablations:
  • Late fusion (45.4% on ImageNetVC Color) outperformed early fusion (41.9%) and prepending visual tokens (42.4%).
  • Accuracy scales with image count $k$, plateauing around $k \approx 6$ images.

Limitations and Future Work

  • Inference Latency: Generating $k$ images with diffusion models creates noticeable overhead. Predicting a single token using $k=10$ generated images takes ~1,532 ms versus 12 ms for text-only GPT-2 (though substituting CLIP text embeddings drops this to 50 ms at a minor performance cost).
  • Dependence on Generative Quality: If the text-to-image generator fails to capture nuanced, multi-object relationships or rare concepts, the visual cues may offer limited utility.
  • Future Work: The authors aim to explore faster single-step generative models to cut inference latency and extend the framework to complex visual reasoning tasks involving intricate multi-object interactions.

Summary updated

BibTeX
@inproceedings{yariv2026improving,
  author = {Guy Yariv and Idan Schwartz and Yossi Adi and Sagie Benaim},
  title = {{Improving Visual Commonsense in Language Models via Multiple Image Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-short.3},
}
Figure