NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Exploring Graph Structure Comprehension Ability of Multimodal Large Language Models: Case Studies

Zhiqiang Zhong, Davide Mottin

TL;DR

Can multimodal large language models (MLLMs) understand graphs better if we show them pictures of the graphs alongside text? This paper introduces $\text{GAI}^+$, a multimodal evaluation framework that feeds both textual graph encodings and rendered 2D graph plots into frontier models like GPT-4o. The authors find that visual modalities can boost performance on global graph properties like cycle detection, but visual input alone is insufficient and struggles as graph density grows.

What Problem Does This Paper Address?

While Large Language Models (LLMs) can process graphs represented purely as text (such as edge lists or adjacency lists), textual encodings struggle to capture spatial context and global graph topology. Humans naturally rely on node-link diagrams to intuit structural properties. With the rise of vision-capable models (MLLMs), a natural question arises: Does providing visual graph renderings alongside text improve graph structure comprehension, and what are the limitations of current visual representations?

Methods

The authors build upon the GraphQA benchmark and evaluate three input setups:

  • Text-only: Standard adjacency or incident list representations.
  • $\text{GAI}$ (Graph as Image): Image-only input showing a rendered graph.
  • $\text{GAI}^+$: Multimodal input combining both textual graph descriptions and rendered images.

The core components include:

  • Graph Visualiser: Generates static 2D plots using Matplotlib defaults at a fixed image size.
  • Graph Text Encoders: Uses adjacency encoding (e.g., listing edge pairs) and incident encoding (listing neighbor sets per node).
  • Prompt Strategies: Tests multiple prompt styles adapted from GraphQA, including Zero-shot, Few-shot, Chain-of-Thought (CoT), Zero-shot CoT, and Bag-of-Thoughts (CoT-BAG).
  • Models: Evaluates closed-source models (GPT-4, GPT-4o) and open-source models (LLaVA-NeXT-7B).

Datasets

The authors synthesized 500 undirected graphs using the Erdős–Rényi (ER) random graph model, with sizes ranging from 5 to 20 nodes. Across these graphs, they benchmarked eight core graph reasoning tasks across three structural tiers:

  • Node-level: Node degree, identifying connected nodes.
  • Edge-level: Edge existence, shortest path.
  • Graph-level: Node count, edge count, cycle check, and triangle counting.

Key Insights and Ideas

  • Vision and text are complementary: Visual-only inputs ($\text{GAI}$) perform substantially worse across almost all metrics than text-based inputs. MLLMs cannot reliably count nodes or read dense connectivity from an image alone; the visual modality serves primarily as a contextual aid to textual specifications.
  • Global vs. Local disparity: Visual representations yield the most notable gains on tasks requiring global structural awareness (e.g., detecting cycles), whereas local properties (like exact node degree or connected neighbors) are often processed more reliably directly from structured text.
  • General-purpose MLLMs outperform specialized graph architectures: Frontier multimodal models (GPT-4o) matched or beat specialized neural methods like GraphToken and standard GCNs across several benchmark tasks without requiring task-specific fine-tuning.
  • Visual clutter creates a bottleneck: Simple, sparse graphs are easy for vision models to parse, but as density increases, overlapping edges and occluded node labels cause visual reasoning to degrade rapidly.

Key Results

  • Frontier MLLM Leap: GPT-4 and GPT-4o drastically outperformed earlier text-only baselines (PaLM in GraphQA). For instance, on GPT-4o Zero-Shot with Incident encoding, edge existence accuracy reached 99.2% (vs. 49.0% for PaLM) and cycle check achieved 98.4% (vs. 82.0% for PaLM).
  • Impact of Multimodal Input ($\text{GAI}^+$): In GPT-4o CoT settings with Adjacency encoding, adding graph images improved cycle check accuracy from 93.4% to 95.8% and edge existence from 92.2% to 95.0%.
  • Comparison to Specialized Models (Table 3): $\text{GAI}$ reached 98.8% on cycle check (vs. 95.6% for GraphToken and 96.4% for GCN) and 76.4% on shortest path (vs. 63.8% for GraphToken and 60.4% for GCN).
  • Open-source Struggles: The 7B parameter open-source model (LLaVA-NeXT-7B) performed poorly overall, frequently dropping to near 0% accuracy on complex reasoning tasks (such as shortest path or Few-Shot counting).

Limitations and Future Work

  • Small Graph Scale: Experiments were constrained to small ER graphs (5–20 nodes). Scaling to hundreds or thousands of nodes will exacerbate visual occlusion.
  • Naïve Visualization: The study used default Matplotlib layouts. The authors note that optimized layouts, dynamic/interactive graph zooming, sampling-based rendering, and hierarchical visualizations are necessary next steps.
  • Loss of Permutation Invariance: Unlike Message-Passing Graph Neural Networks (MPNNs), pixel-based representations do not inherently preserve graph symmetries or permutation invariance.
  • Future Integration: The authors suggest developing lightweight adapters bridging MPNN structural embeddings directly with multimodal LLM representations.

Summary updated

BibTeX
@inproceedings{zhong2024exploring,
  author = {Zhiqiang Zhong and Davide Mottin},
  title = {{Exploring Graph Structure Comprehension Ability of Multimodal Large Language Models: Case Studies}},
  booktitle = {LoG},
  year = {2024},
  url = {https://openreview.net/forum?id=Lgw9Gwfait},
}
Figure