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 ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 27 code samples harvested from 2 repositories linked to this paper: 17 ran (of which 2 constructed an object rather than computing a result; 14 with no instrument failure: 1 honoured, 1 violated, 12 with no contract checked; 3 where Syntology's instrument failed) · 10 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

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

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 2 of the 17 samples that ran have no recorded date.

zjunlp/MKG_Analogy officialmentioned in papermentioned on GitHubpytorchSyntology: 15 samples, 5 ran (1 instrument-failed) · 10 unverified report
zjunlp/MKGformer mentioned on GitHubpytorchMITSyntology: 12 samples, 12 ran (2 instrument-failed) · 0 unverified 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: 17 ran (of which 2 constructed an object rather than computing a result; 14 with no instrument failure: 1 honoured, 1 violated, 12 with no contract checked; 3 where Syntology's instrument failed) · 10 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
1ran · violated contract
3ran · our draft was wrong
12ran
10unverified

Licence: 2 of the 27 samples are pointer only, meaning Syntology does not serve that copy's text. For 2 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. 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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 2 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

zjunlp/MKG_Analogy official repository 15 samples, 5 ran (1 instrument-failed) · 10 unverified
CLIPMLP MarT/models/modeling_clip.py ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · afce1111b619c932 · report fixture: returned CLIPMLP · level recorded 2026-09-22
CLIPVisionEmbeddings in 5 papers MarT/models/modeling_clip.py ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 83268e2e1fee13be · report fixture: returned CLIPVisionEmbeddings · level recorded 2026-09-22
_expand_mask in 13 papers
census: 13 implementations from 13 papers, 2 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32
MarT/models/modeling_clip.py ran · our draft was wrong MIT (permissive) · 4b1fb3ae6a6d23fd · report fixture: signature mask:Tensor/2/float, dtype:dtype/0/?, tgt_len:int/0/int · returned Tensor · level recorded 2026-09-22
clip_loss in 35 papers MarT/models/modeling_clip.py ran · violated contract fingerprinted MIT (permissive) · 1aa7f7b75b2418fa · report fixture: signature similarity:Tensor/2/float · returned Tensor · level recorded 2026-09-22
contrastive_loss in 80 papers
census: 11 implementations from 18 papers, 7 distinct outputs across 3 buckets, one shared input per bucket this sample: bucket 1 of 3, arg 1: rank 2, kind float, dtype float32
MarT/models/modeling_clip.py ran · honoured contract fingerprinted MIT (permissive) · f2e5f28608115fa6 · report fixture: signature logits:Tensor/2/float · returned Tensor · level recorded 2026-09-22
CLIPAttention in 5 papers MarT/models/modeling_clip.py unverified MIT (permissive) · bc71a7b0ac64e193 · report
CLIPBaseModelOutput MarT/models/modeling_clip.py unverified MIT (permissive) · eac07c4625c7ecf0 · report
CLIPBaseModelOutputWithPooling MarT/models/modeling_clip.py unverified MIT (permissive) · 0a895d6880258edf · report
CLIPEncoder in 6 papers MarT/models/modeling_clip.py unverified MIT (permissive) · 89fb5ce36cf33f90 · report
CLIPEncoderLayer in 5 papers MarT/models/modeling_clip.py unverified MIT (permissive) · d8f1abf8ccc978b3 · report
CLIPModel in 6 papers MarT/models/modeling_clip.py unverified MIT (permissive) · 27ff4c9021371f00 · report
CLIPOutput in 5 papers MarT/models/modeling_clip.py unverified MIT (permissive) · c1560a0097321925 · report
CLIPTextEmbeddings in 5 papers MarT/models/modeling_clip.py unverified MIT (permissive) · f27778de07c0b042 · report
CLIPTextTransformer in 5 papers MarT/models/modeling_clip.py unverified MIT (permissive) · cb9f127c9449b83d · report
CLIPVisionTransformer in 5 papers MarT/models/modeling_clip.py unverified MIT (permissive) · 255891e0b510d846 · report
zjunlp/MKGformer community (archive-listed) 12 samples, 12 ran (2 instrument-failed) · 0 unverified
acc in 48 papers
census: 5 implementations from 5 papers, 2 distinct outputs across 2 buckets, one shared input per bucket
MKG/lit_models/utils.py ran MIT (permissive) · e5c96daa2363c6ff · report fixture: signature logits:ndarray/2/float, labels:ndarray/1/int · returned float64 · level recorded 2026-09-25
clip_loss in 35 papers MKG/models/modeling_clip.py ran · our draft was wrong fingerprinted MIT (permissive) here; the stored copy is pointer only · e5b89b1f72c319ed · report fixture: signature similarity:Tensor/2/float · returned Tensor · level recorded, date not recorded
contrastive_loss in 80 papers
census: 11 implementations from 18 papers, 7 distinct outputs across 3 buckets, one shared input per bucket this sample: bucket 1 of 3, arg 1: rank 2, kind float, dtype float32
MKG/models/modeling_clip.py ran · our draft was wrong fingerprinted MIT (permissive) here; the stored copy is pointer only · 4675779aec92d6c0 · report fixture: signature logits:Tensor/2/float · returned Tensor · level recorded, date not recorded
decode in 57 papers MKG/lit_models/transformer.py ran MIT (permissive) · 4aaee21eb89b469e · report fixture: signature output_ids:Tensor/2/int, tokenizer:MockTokenizer/0/? · returned list · level recorded 2026-09-25
get_entity_spans_pre_processing MKG/models/utils.py ran fingerprinted MIT (permissive) · a0b34bcb573fbd1c · report fixture: signature sentences:list/1/str · returned list · level recorded 2026-09-25
get_extended_attention_mask in 6 papers MKG/models/modeling_unimo.py ran MIT (permissive) · dd48a2143b53be6f · report fixture: signature attention_mask:Tensor/2/int, input_shape:tuple/1/int, device:device/0/? · returned Tensor · level recorded 2026-09-25
get_head_mask MKG/models/modeling_unimo.py ran MIT (permissive) · 14ea78cc67ff4f00 · report fixture: signature head_mask:NoneType/0/?, num_hidden_layers:int/0/int, is_attention_chunked:bool/0/bool · returned list · level recorded 2026-09-25
label_smoothed_nll_loss in 43 papers MKG/models/utils.py ran MIT (permissive) · fadc10fc2c451c92 · report fixture: signature lprobs:Tensor/2/float, target:Tensor/1/int, epsilon:float/0/float, ignore_index:int/0/int · returned tuple · level recorded 2026-09-25
lmap in 15 papers MKG/lit_models/transformer.py ran MIT (permissive) · cca3a1dc3db5bbf1 · report fixture: signature f:callable/0/?, x:list/1/int · returned list · level recorded 2026-09-25
multilabel_categorical_crossentropy in 6 papers MKG/lit_models/transformer.py ran fingerprinted MIT (permissive) · d235c954a3acaf08 · report fixture: signature y_pred:Tensor/2/float, y_true:Tensor/2/float · returned Tensor · level recorded 2026-09-25
rank_score MKG/lit_models/utils.py ran MIT (permissive) · a698ba8988b64507 · report fixture: signature ranks:list/1/int · returned tuple · level recorded 2026-09-25
replace_return_docstrings in 6 papers MKG/models/utils.py ran MIT (permissive) · 67aa808378a82feb · report fixture: signature output_type:callable/0/?, config_class:str/0/str · returned function · level recorded 2026-09-25

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for MarT (graph method: MarT). 15 bricks; individually on a fixture: 5 ran (of which 2 constructed an object rather than computing a result; 4 with no instrument failure: 1 honoured, 1 violated, 2 with no contract checked; 1 where Syntology's instrument failed) · 10 unverified. The assembly has not been run end-to-end.

  1. CLIPModel entry · level 0 · unverified · 27ff4c9021371f00
  2. CLIPOutput helper · level 0 · unverified · c1560a0097321925
  3. CLIPTextTransformer helper · level 0 · unverified · cb9f127c9449b83d
  4. CLIPVisionTransformer helper · level 0 · unverified · 255891e0b510d846
  5. clip_loss loss · level 1 · ran · violated contract · 1aa7f7b75b2418fa
  6. CLIPEncoder model · level 0 · unverified · 89fb5ce36cf33f90
  7. CLIPTextEmbeddings model · level 0 · unverified · f27778de07c0b042
  8. _expand_mask helper · level 1 · ran · our draft was wrong · 4b1fb3ae6a6d23fd
  9. CLIPBaseModelOutputWithPooling helper · level 0 · unverified · 0a895d6880258edf
  10. CLIPVisionEmbeddings model · level 1 · ran · 83268e2e1fee13be
  11. contrastive_loss loss · level 1 · ran · honoured contract · f2e5f28608115fa6
  12. CLIPBaseModelOutput helper · level 0 · unverified · eac07c4625c7ecf0
  13. CLIPEncoderLayer model · level 0 · unverified · d8f1abf8ccc978b3
  14. CLIPAttention model · level 0 · unverified · bc71a7b0ac64e193
  15. CLIPMLP model · level 1 · ran · afce1111b619c932

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2210.00312") returns these assemblies with each brick's role and wiring (how to connect).

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