Multimodal Graph Neural Network

Machine Learning
Introduced by
Kipf & Welling (GNN foundation); extended to multimodal settings by multiple research groups c. 2019–2020
Year
2019–2020
Type
Graph-based deep learning with multimodal input fusion
Family
Deep learning / NLP / CV

What does it do?

A Multimodal Graph Neural Network (MM-GNN) represents data from several modalities, such as text, images and structured features, as the nodes and edges of one graph, then applies graph-based message passing to learn joint representations.

Its distinguishing feature is that relationships between items, within and across modalities, are explicit inputs to the model rather than being left to a flat concatenation of feature vectors.

The intuition behind the method

Think of each piece of information, such as a sentence, an image region or a user attribute, as a node in a network. Edges encode relationships that the task makes meaningful, for example a caption linked to its image or a patient record linked to a lab result. The model passes messages along these edges, so each node takes in context from neighbours in other modalities as well as its own. The result is a joint embedding that reflects both the structure within each modality and the dependencies between modalities. Simple concatenation of feature vectors does not represent those dependencies explicitly, so the extra cost of a graph is justified mainly when those dependencies matter for the task.

History

Kipf & Welling (2017) popularised graph convolutional networks, on which many graph-based models build. The extension to multimodal inputs developed around 2019–2020, as several research groups adapted graph-based models to combine text, image and structured inputs.

When to use it

Choose an MM-GNN when the data is naturally relational, meaning items have explicit or well-justified inferred connections, and when the modalities carry complementary information that those connections link. Example tasks include knowledge-based visual question answering, scene graph generation, drug-target interaction prediction, and clinical reasoning that combines imaging with patient records. Do not use it when the modalities are independent and simple concatenation is adequate, when no meaningful graph can be built, or when reviewers require coefficient-level interpretability. Labelled data is a real constraint: the message-passing layers need enough supervision to train. With very small labelled sets, a simpler fusion baseline is a safer starting point, and pre-trained encoders reduce the data burden without removing it.

Limitations and considerations

  • Results depend heavily on graph construction, which requires domain knowledge; a poor choice of edges can noticeably degrade performance.
  • Dense graphs are costly to process, so large graphs typically need neighbour sampling or sparse approximations.
  • Pre-trained unimodal encoders add compute and data requirements on top of the GNN itself.
  • Cross-modal attention weights are hard to interpret and are often explained only post hoc.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Represents relations within and across modalities explicitly, so dependencies that are hard to capture in flat feature concatenation can be modelled directly.
  • Any combination of visual, textual, audio or structured inputs can be encoded as nodes, each with its own modality-specific encoder.
  • Heterogeneous graphs with distinct node and edge types let domain structure, such as knowledge-graph relations, be built into the model.
  • Repeated message passing aggregates multi-hop context, which suits tasks grounded in an external knowledge graph.

Applications

  • Example use case: visual question answering grounded in an external knowledge graph.
  • Example use case: medical image and clinical report analysis, linking imaging findings to patient record graphs.
  • Example use case: drug-target interaction prediction, combining molecular graphs with textual compound descriptions.
  • Example use case: social media analysis, modelling users, posts and images as heterogeneous graph nodes.
  • Example use case: scene graph generation, linking detected objects through relational predicates from captions.
  • Example use case: recommendation, combining user-item interaction graphs with textual reviews and product images.

How it works

How it works

1

Nodes are defined for the items of each modality, such as image regions, sentences or knowledge-base entities. Edges are added for semantic, spatial, temporal or co-occurrence relations, both within and across modalities. The graph topology is a modelling decision rather than something the update formula determines, so the construction strategy has a large effect on results and has to be chosen for the domain.

2

Each modality is first encoded by a suitable backbone, for example a CNN or ViT for images, a transformer such as BERT for text, or an MLP for tabular features. This step gives every node its initial feature vector, which is the input to the first message-passing layer.

3

Cross-modal edges or attention mechanisms connect the modality-specific subgraphs. Common options are bilinear attention between visual and textual nodes, cross-modal graph attention layers, and dedicated fusion nodes that collect signals from modality-specific neighbours. The chosen option determines which cross-modal dependencies the network can represent.

4

In each layer, a node's new embedding is computed by aggregating its neighbours' embeddings together with its own, then applying a shared weight matrix W and a non-linearity σ, as in the simplified form shown. Kipf & Welling (2017) use a symmetrically normalised adjacency matrix with added self-loops, and multimodal variants differ mainly in their aggregation functions AGG. The form shown has no explicit edge-type or attention weights; including those requires a different AGG. Stacking layers lets information travel across modalities over several hops.

Formula
h_v^{(k+1)} = \sigma\!\left(W^{(k)} \cdot \text{AGG}\left(\{h_u^{(k)} : u \in \mathcal{N}(v)\} \cup \{h_v^{(k)}\}\right)\right)
5

After the message-passing rounds, node embeddings are pooled (by mean, max or attention weighting) into a graph-level or task-specific representation. This representation feeds an output head for classification, regression, retrieval or generation.

Common pitfalls

  • Connecting every node to every other without pruning can cause over-smoothing, in which node embeddings become similar and discriminative signal is lost.
  • Fusing embeddings from different modalities before normalising them to comparable scales can let one modality dominate the aggregation.
  • Fixing the graph in advance when the relations should be learned from data limits what the model can exploit; learned edge structure is a design option to test.
  • Freezing the unimodal encoders throughout GNN training prevents their features from adapting to the graph task. Whether to fine-tune them is a choice to validate on held-out data.
  • Evaluating only on nodes or graph structures seen during training can overstate performance; held-out nodes or graphs are needed where deployment involves unseen structures.

Frequently asked questions

How is a Multimodal GNN different from a multimodal transformer?

Transformers use dense global self-attention over sequence tokens; MM-GNNs use sparse, structured message passing over an explicit graph. GNNs are preferred when relational structure (edges, node types) is known or meaningful; transformers are preferred when the relationship structure is implicit and should be learned from data.

What graph construction strategy should I use?

Common choices include fully-connected graphs with learned edge weights, k-nearest-neighbour graphs in embedding space, knowledge-graph-based edges, and spatial or temporal adjacency. Fully-connected graphs are possible but risk over-smoothing and add cost, so prune them (for example with k-nearest-neighbour or thresholded edges) and compare the options on validation performance. Match the edges to the domain: spatial adjacency for scene graphs, knowledge-graph edges for question answering, and similarity-based edges when no prior relational structure exists.

How do I handle missing modalities at inference time?

Strategies include: masking missing nodes with learnable embeddings, training with random modality dropout to build robustness, or using a modality-imputation branch. The choice should be validated on a held-out set with the same missingness pattern expected in deployment.

Is over-smoothing a risk?

Yes. With many message-passing layers, node embeddings can become similar regardless of modality or class. Keep the depth small, consider residual connections or other techniques that limit smoothing, and tune the depth on validation data.

What dataset size is reasonable?

MM-GNNs have more relational structure and more parameters to learn than a single-modality model, so they generally need more labelled examples. No fixed size threshold applies across tasks. For smaller datasets, pre-train the unimodal encoders on large corpora, use the GNN mainly as the relational fusion head, and check results on held-out data.

Related methods

Sources

  1. Kipf, T. N., & Welling, M. (2017). Semi-Supervised Classification with Graph Convolutional Networks. International Conference on Learning Representations (ICLR).

    Open publication reference
  2. Zhang, Z., Lin, H., & Zhao, X. (2020). Multimodal Graph Neural Network for Knowledge-Based Visual Question Answering. Information Processing & Management, 57(6), 102382.

    Open publication reference