Mario: Multimodal Graph Reasoning with Large Language Models

Yuanfu Sun, Kang Li, Pengkang Guo, Jiajin Liu, Qiaoyu TanCVPR 2026

TL;DR

Mario is a novel two-stage framework that enables Large Language Models (LLMs) to perform effective reasoning over Multimodal Graphs (MMGs), where nodes contain both textual and visual attributes. By introducing a graph-conditioned vision-language model for structure-aware alignment and a modality-adaptive prompt router, Mario successfully overcomes the challenges of weak cross-modal consistency and varying node modality preferences. It achieves state-of-the-art performance in node classification and link prediction, demonstrating exceptional zero-shot transfer capabilities across unseen graph domains.

What Problem Does This Paper Address?

In the real world, multimodal data rarely exists in isolation. E-commerce products, social media posts, and academic papers are inherently interconnected, forming Multimodal Graphs (MMGs) where nodes possess both text and images, and edges represent relationships.

While Large Language Models (LLMs) and Vision-Language Models (VLMs) excel at processing independent image-text pairs, extending them to reason over graph topologies introduces two major hurdles:

  1. Weak Cross-Modal Consistency: In realistic graphs, an image attached to a node isn't always a clean, descriptive caption of the text. In isolation, either modality can be noisy or incomplete.
  2. Heterogeneous Modality Preference: A "one-size-fits-all" prompting strategy fails because different nodes rely on different modalities. Some nodes are text-salient, others are image-salient, and some require a balanced mix of both. Forcing the LLM to process uninformative or noisy modalities degrades reasoning performance.

As shown in the paper's introductory analysis, nearly 30% of correctly classified nodes are only captured when using specific, single-modality prompt templates rather than a combined text-and-image template, highlighting the critical need for adaptive prompting.

Methods

Mario addresses these challenges using a decoupled, two-stage architecture:

Figure 2. Overview of the proposed Mario framework. Given a MMG, Stage 1 uses a graph-conditioned vision–language model to perform structure-aware image–text alignment: images and texts are initially encoded, symmetrically refined by a transformer-embedded mixer that injects graph structure into token embeddings, and then aligned via contrastive learning. Stage 2 builds on these aligned features with modality-adaptive graph instruction tuning, where a lightweight router, trained under LLM supervision (a), infers each node’s modality preference and selects the most suitable modality-specific template for effective multimodal graph reasoning (b).

Stage 1: Graph-Conditioned Vision-Language Model (GVLM)

Instead of relying on frozen, node-isolated VLM embeddings, Mario implements a dual-tower encoder augmented with a Topology-Aware Multimodal Mixer. At each layer, the model extracts the [CLS] token summaries of all nodes and passes them through a transformer block enriched with a graph-aware position bias (based on shortest-path distances). This forces the text and image representations to fold in neighborhood context before alignment. The entire GVLM is trained using a symmetric, bidirectional InfoNCE contrastive loss, ensuring that the resulting representations are both cross-modally coherent and structure-aware.

Stage 2: Modality-Adaptive Graph Instruction Tuning

To handle diverse modality preferences, Mario introduces a Modality-Adaptive Prompt Router (MAPR). For every node, Mario constructs three distinct instruction views: Text-Only, Image-Only, and Multimodal (Text+Image), incorporating top-K 1-hop and 2-hop neighbor context.

During training, all three templates are evaluated. The lightweight MAPR (an MLP) learns to predict a routing probability distribution based on the node's features, neighborhood context, and graph degree. The system minimizes a composite loss that pairs a performance-weighted LLM loss with a KL-divergence term, effectively forcing the router to favor the template that yields the lowest language modeling loss. At inference time, the router switches to a hard policy, executing only the single most informative template to keep computational costs identical to a standard single-template pipeline.

Datasets

The authors evaluated Mario across six diverse, real-world MMG benchmarks spanning three distinct domains:

  • E-commerce: Amazon-Arts&Crafts, Amazon-CDs&Vinyl, Amazon-Movies, and Amazon-Toys.
  • Social Networks: Reddit-S.
  • Literature: Goodreads (Books).

The datasets were evaluated under three paradigms: Single-Focus (trained and tested on individual datasets), Mix-Training (trained on a joint mixture of datasets), and Zero-Shot Transfer (trained on source domains like "Toys" and evaluated on entirely unseen target domains like "Movies" or "Books").

Key Insights and Ideas

  • Graph Topology as a Cross-Modal Bridge: A key "aha moment" is that graph structure can actively fix weak cross-modal consistency. If a node has a noisy image, the text and images of its structural neighbors provide the missing semantic context needed to align the node's internal modalities.
  • Modality Homophily: The authors discovered that modality preferences are not randomly scattered across a graph; they exhibit homophily. Neighboring nodes tend to share similar modality preferences (e.g., clusters of visually dominant products vs. clusters of text-heavy items), validating why local graph context is highly predictive for the prompt router.
  • Dynamic Pruning Accelerates LLM Training: Counterintuitively, optimizing a router over three separate templates speeds up overall LLM convergence. By dynamically shielding the LLM from noisy or mismatched modalities, the supervisory signal becomes cleaner, allowing the model to converge in roughly half the epochs required by single-template baselines.

Key Results

  • State-of-the-Art Accuracy: In Single-Focus experiments, Mario consistently outperformed all text-only, image-only, and multimodal baselines. Notably, it raised node classification accuracy on the CDs dataset from the best baseline of 56.45% to 63.43%.
  • Superior Zero-Shot Generalization: Mario demonstrated massive gains in zero-shot transfer settings. For example, when transferring from Toys to Movies, Mario achieved 1.64× higher node classification accuracy than the leading state-of-the-art multimodal graph baseline (MLaGA).
  • Faster Convergence: As illustrated in the training curves, Mario achieves significantly faster convergence during instruction tuning, reaching lower final losses in fewer epochs.
Figure 3. Training curves of Mario vs. the text-only template (Fixed) on two datasets, with early-stopping epochs in the end.

Limitations and Future Work

While highly effective, Mario has a few limitations acknowledged by the authors:

  • Per-Step Training Cost: Because Stage 2 requires three forward-backward passes (one for each template view) to compute the posterior distribution for the router, the per-epoch training time is roughly 1.5–2× longer than a single-template baseline (though this is mitigated by requiring fewer total epochs to converge).
  • Modality Scope: The current framework is tailored specifically to text and image modalities. Future work could explore expanding the architecture to handle richer heterogeneous graphs containing video, audio, or hyper-relational structures.

Summary updated

BibTeX
@inproceedings{sun2026mario,
  author = {Yuanfu Sun and Kang Li and Pengkang Guo and Jiajin Liu and Qiaoyu Tan},
  title = {{Mario: Multimodal Graph Reasoning with Large Language Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=2s4TaCzIAY},
}
Figure