Papers › Multimodal Analogical Reasoning over Knowledge Graphs

Multimodal Analogical Reasoning over Knowledge Graphs

1 Oct 2022arXiv:2210.00312archive 2025-07-28

Ningyu Zhang, Lei LI, Xiang Chen, Xiaozhuan Liang, Shumin Deng, Huajun Chen

Analogical reasoning is fundamental to human cognition and holds an important place in various fields. However, previous studies mainly focus on single-modal analogical reasoning and ignore taking advantage of structure knowledge. Notably, the research in cognitive psychology has demonstrated that information from multimodal sources always brings more powerful cognitive transfer than single modality sources. To this end, we introduce the new task of multimodal analogical reasoning over knowledge graphs, which requires multimodal reasoning ability with the help of background knowledge. Specifically, we construct a Multimodal Analogical Reasoning dataSet (MARS) and a multimodal knowledge graph MarKG. We evaluate with multimodal knowledge graph embedding and pre-trained Transformer baselines, illustrating the potential challenges of the proposed task. We further propose a novel model-agnostic Multimodal analogical reasoning framework with Transformer (MarT) motivated by the structure mapping theory, which can obtain better performance. Code and datasets are available in https://github.com/zjunlp/MKG_Analogy.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2210.00312")

Code

Syntology Ran 7 of 27 code samples harvested from 2 repositories linked to this paper; 20 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract; 3 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 5 ran; community (archive-listed): 12 samples from 1 repository, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

zjunlp/MKG_Analogy officialmentioned in papermentioned on GitHubpytorch report
zjunlp/MKGformer mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

27 samples harvested; 7 ran; 1 honoured the contract we drafted; 20 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · violated contract
3ran · our draft was wrong
2ran
20unverified

Licence: 0 of the 27 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

CLIPMLP zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · afce1111b619c932 · report
CLIPVisionEmbeddings zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 83268e2e1fee13be · report
_expand_mask zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository ran · our draft was wrong MIT (permissive) · 4b1fb3ae6a6d23fd · report
clip_loss zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository ran · violated contract fingerprinted MIT (permissive) · 1aa7f7b75b2418fa · report
contrastive_loss zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository ran · honoured contract fingerprinted MIT (permissive) · f2e5f28608115fa6 · report
CLIPAttention zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · bc71a7b0ac64e193 · report
CLIPBaseModelOutput zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · eac07c4625c7ecf0 · report
CLIPBaseModelOutputWithPooling zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · 0a895d6880258edf · report
CLIPEncoder zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · 89fb5ce36cf33f90 · report
CLIPEncoderLayer zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · d8f1abf8ccc978b3 · report
CLIPModel zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · 27ff4c9021371f00 · report
CLIPOutput zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · c1560a0097321925 · report
CLIPTextEmbeddings zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · f27778de07c0b042 · report
CLIPTextTransformer zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · cb9f127c9449b83d · report
CLIPVisionTransformer zjunlp/MKG_Analogy/MarT/models/modeling_clip.py official repository unverified MIT (permissive) · 255891e0b510d846 · report
clip_loss zjunlp/MKGformer/MKG/models/modeling_clip.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · e5b89b1f72c319ed · report
contrastive_loss zjunlp/MKGformer/MKG/models/modeling_clip.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 4675779aec92d6c0 · report
acc zjunlp/MKGformer/MKG/lit_models/utils.py community (archive-listed) unverified MIT (permissive) · e5c96daa2363c6ff · report
decode zjunlp/MKGformer/MKG/lit_models/transformer.py community (archive-listed) unverified MIT (permissive) · 4aaee21eb89b469e · report
get_entity_spans_pre_processing zjunlp/MKGformer/MKG/models/utils.py community (archive-listed) unverified MIT (permissive) · a0b34bcb573fbd1c · report
get_extended_attention_mask zjunlp/MKGformer/MKG/models/modeling_unimo.py community (archive-listed) unverified MIT (permissive) · dd48a2143b53be6f · report
get_head_mask zjunlp/MKGformer/MKG/models/modeling_unimo.py community (archive-listed) unverified MIT (permissive) · 14ea78cc67ff4f00 · report
label_smoothed_nll_loss zjunlp/MKGformer/MKG/models/utils.py community (archive-listed) unverified MIT (permissive) · fadc10fc2c451c92 · report
lmap zjunlp/MKGformer/MKG/lit_models/transformer.py community (archive-listed) unverified MIT (permissive) · cca3a1dc3db5bbf1 · report
multilabel_categorical_crossentropy zjunlp/MKGformer/MKG/lit_models/transformer.py community (archive-listed) unverified MIT (permissive) · d235c954a3acaf08 · report
rank_score zjunlp/MKGformer/MKG/lit_models/utils.py community (archive-listed) unverified MIT (permissive) · a698ba8988b64507 · report
replace_return_docstrings zjunlp/MKGformer/MKG/models/utils.py community (archive-listed) unverified MIT (permissive) · 67aa808378a82feb · report

Tasks

Graph EmbeddingKnowledge Graph EmbeddingKnowledge GraphsMultimodal Reasoning

Datasets

Introduced by this paper, per the archive.

MARS (Multimodal Analogical Reasoning dataSet)MarKG

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Knowledge Graphs MARS (Multimodal Analogical Reasoning dataSet) MarT_MKGformer MRR 0.341 #1 of 8 Archive leaderboard report
Knowledge Graphs MARS (Multimodal Analogical Reasoning dataSet) MKGformer MRR 0.321 #2 of 8 Archive leaderboard report
Knowledge Graphs MARS (Multimodal Analogical Reasoning dataSet) MarT_FLAVA MRR 0.288 #3 of 8 Archive leaderboard report
Knowledge Graphs MARS (Multimodal Analogical Reasoning dataSet) ViLBERT MRR 0.287 #4 of 8 Archive leaderboard report
Knowledge Graphs MARS (Multimodal Analogical Reasoning dataSet) IKRL (ANALOGY) MRR 0.283 #5 of 8 Archive leaderboard report
Knowledge Graphs MARS (Multimodal Analogical Reasoning dataSet) IKRL MRR 0.274 #6 of 8 Archive leaderboard report
Knowledge Graphs MARS (Multimodal Analogical Reasoning dataSet) ViLT MRR 0.257 #7 of 8 Archive leaderboard report
Knowledge Graphs MARS (Multimodal Analogical Reasoning dataSet) TransAE MRR 0.223 #8 of 8 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections