Abstract
Large Language Models (LLMs) excel at linguistic tasks but often struggle with basic physical commonsense, as textual data rarely explicitly describes obvious physical properties or spatial relationships. This paper introduces Loire (Learning Commonsense from Images for Reasoning), a framework that bridges this gap by distilling "visual commonsense" from image-caption pairs. Loire utilizes a two-stage process: first, training a text encoder to generate scene layouts (object labels and bounding boxes) from captions, and second, using this visually-aware encoder to augment standard language models on reasoning tasks. Experimental results on CommonsenseQA and WinoGrande demonstrate that Loire consistently outperforms text-only baselines, proving that structural visual knowledge is a powerful supplement for complex reasoning.
Introduction
While LLMs demonstrate remarkable proficiency in text processing, they frequently lack the "commonsense" knowledge humans acquire through physical interaction. For instance, a model might not inherently understand the relative size of a fork compared to a table or the typical location of a fire extinguisher. Text is often a "sparse" medium for this information because humans seldom document the obvious. In contrast, images explicitly depict spatial relationships, relative scales, and object co-occurrences. Loire aims to capture this visual wisdom by translating it into a format usable by text-based models.
The Loire Framework
The authors propose a two-stage pipeline designed to integrate visual structural knowledge into language representations.
Visual Commonsense Learning
Instead of processing raw pixels directly, which can be computationally intensive and noisy, Loire focuses on scene layouts. The model is trained on a "scene layout generation" task using image captions and corresponding object bounding boxes. A text encoder, dubbed ViBERT, is fine-tuned to predict the coordinates $(x, y, w, h)$ and labels of objects described in a caption. This process forces the model to encode spatial relations and typical object groupings.
Knowledge-Augmented Reasoning
Once ViBERT has acquired visual literacy, it serves as a fixed feature extractor. For downstream reasoning tasks, input text is processed by both a standard pre-trained LM (e.g., RoBERTa) and the visually-aware ViBERT. Their representations are aligned via a projection matrix and concatenated to inform the final prediction.
Datasets and Training
The model leverages MS COCO for the upstream layout generation task, utilizing its 120,000 images and instance-level annotations across 80 categories. This supervision signal allows the model to learn high-level structural knowledge, such as the fact that people are usually positioned near tables during a meal.
Evaluation is conducted on two primary benchmarks:
- CommonsenseQA: A dataset of ~12,000 questions requiring spatial, causal, and social reasoning derived from ConceptNet.
- WinoGrande: A large-scale benchmark for pronoun resolution requiring deep semantic and physical understanding.
Key Results and Insights
Loire-BERT improved test accuracy on CommonsenseQA by 1.91% over the standard BERT baseline. Loire-RoBERTa (Large) achieved 71.93% accuracy, indicating that visual knowledge benefits even high-capacity models. On WinoGrande, Loire showed robust improvements across all training set sizes, suggesting that visual commonsense is a consistent feature that does not merely rely on seeing more task-specific training examples.
Ablation studies confirmed that the performance gains were specifically due to the layout generation task rather than simply training on more text (captions) via standard Masked Language Modeling (MLM). Qualitatively, Loire demonstrated superior contextual understanding; for example, correctly associating a scene involving motor oil with a "garage" rather than a "utility room" by recognizing the co-occurrence of vehicles and mechanical tools.
Conclusion and Future Work
By using scene layouts as a "middle ground" between raw pixels and text, Loire effectively captures high-level structural knowledge that is often missing from text-only corpora. While currently limited by the 80 object categories in MS COCO, future work involving larger datasets like Visual Genome could further expand the model's visual vocabulary and reasoning capabilities. Additionally, developing more direct methods to measure what a model has learned visually remains an important open challenge.
Summary updated