SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.05391 · 2024

Knowledge Graphs Meet Multi-Modal Learning: A Comprehensive Survey

arXiv · PDF · Open in the Atlas

Code that ran

15 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 3 have no contract verdict; 9 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2402.05391.json · badge: /api/ran/2402.05391.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
hackerchenzhuo/LaKo canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
China-UK-ZSL/ZS-F-VQA canonical (classifier label)
classifier basis: census
2 ran · 0 no recorded run
zjukg/snag community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
FunctionStatusWhere it lives
add_embeddings Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hackerchenzhuo/LaKo/fact_retrieval.py
code served (permissive licence) · get_code("ac1c2010e4fa00c6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

class MockIndex:
    def __init__(self):
        self.stored_ids = []
        self.stored_embeddings = []
    
    def index_data(self, ids, embeddings):
        self.stored_ids.extend(ids)
        self.stored_embeddings.append(embeddings)

index = MockIndex()
embeddings = torch.randn(2, 4)
ids = [10, 20]
indexing_batch_size = 1

ARGS = {
    "index": index,
    "embeddings": embeddings,
    "ids": ids,
    "indexing_batch_size": indexing_batch_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_attention Ran
ran; our contract draft was wrong, not the code
China-UK-ZSL/ZS-F-VQA/code/model/attention.py
code served (permissive licence) · get_code("745b7eb38c9d1b29")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 12) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Construct tiny tensors for the function
# input: (n, c, ...) where n=batch, c=channels, and remaining dims flatten to spatial
# The function expects input.size()[:2] to be (n, c)
# Then it flattens remaining dims, so we need at least 3D tensor
# Let's make it (n=2, c=4, h=3, w=3) -> flattens to (2, 4, 9)

input_tensor = torch.randn(2, 4, 3, 3)  # batch=2, channels=4, spatial=3x3

# attention: needs to have same size in all dims except dim=1
# attention.size(1) is the number of glimpses
# The rest must match input spatial dimensions when both are viewed
# input spatial: (2, 4, 9) after view
# attention should be (n, glimpses, spatial) = (2, 3, 9)
# So before potential reshaping it could be (2, 3, 3, 3)

attention_tensor = torch.randn(2, 3, 3, 3)  # batch=2, glimpses=3, spatial=3x3

ARGS = {
    "input": input_tensor,
    "attention": attention_tensor,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 12) — shape (2, 12) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
attention Ran
ran; our contract draft was wrong, not the code
zjukg/snag/SNAG_MMEA/model/EVA_tools.py
code served (permissive licence) · get_code("e7d0985e55efb9e7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 5, dtype family float, shape (2, 1, 2, 5, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Analyze the function signature and usage:
# - q, k, v: tensors used in matmul operations with transpose
# - d_k: scalar (int) used in sqrt for scaling
# - mask: optional tensor used with unsqueeze(1) and masked_fill
# - dropout: optional callable (nn.Module) applied to scores

# Create small distinct-sized tensors for q, k, v
# q shape: (batch=2, seq_len=5, d_k=4)
# k shape: (batch=2, seq_len=6, d_k=4)
# v shape: (batch=2, seq_len=6, d_v=3)
batch_size = 2
seq_len_q = 5
seq_len_k = 6
d_k = 4
d_v = 3

q = torch.randn(batch_size, seq_len_q, d_k)
k = torch.randn(batch_size, seq_len_k, d_k)
v = torch.randn(batch_size, seq_len_k, d_v)

# mask: shape (batch=2, 1, seq_len_q=5, seq_len_k=6)
# Values of 1 indicate valid positions, 0 indicates masked positions
mask = torch.ones(batch_size, 1, seq_len_q, seq_len_k)
# Mask out last position for demonstration
mask[:, :, :, -1] = 0

# dropout: an nn.Dropout module (has __call__ method)
dropout = nn.Dropout(p=0.1)

ARGS = {
    "q": q,
    "k": k,
    "v": v,
    "d_k": d_k,
    "mask": mask,
    "dropout": dropout,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 5, dtype family float, shape (2, 1, 2, 5, 3) — shape (2, 1, 2, 5, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_answer Ran
ran, violated the contract we drafted
hackerchenzhuo/LaKo/src/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/contriever, is pointer only (licence: NOASSERTION) · get_code("637b51b8df78832a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/contriever, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cosine_sim Ran
ran; our contract draft was wrong, not the code
zjukg/snag/SNAG_MMEA/model/EVA_tools.py
pointer only (licence: MIT); the stored copy get_code serves, from kadarakos/mulisera, is pointer only (licence: NONE) · get_code("9b0a787b92a87023")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from kadarakos/mulisera, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cross_attention_forward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hackerchenzhuo/LaKo/src/model.py
code served (permissive licence) · get_code("6bef6bdd6eb44070")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

# Define a minimal self object that has all the required attributes and methods
class CrossAttentionModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.n_heads = 2
        self.d_kv = 3
        self.inner_dim = self.n_heads * self.d_kv  # 6
        self.dropout = 0.1
        self.has_relative_attention_bias = True
        self.score_storage = None
        
        # Linear layers
        input_dim = 8
        kv_dim = 10
        self.q = nn.Linear(input_dim, self.inner_dim, bias=False)
        self.k = nn.Linear(kv_dim, self.inner_dim, bias=False)
        self.v = nn.Linear(kv_dim, self.inner_dim, bias=False)
        self.o = nn.Linear(self.inner_dim, input_dim, bias=False)
        
    def compute_bias(self, qlen, klen):
        # Return a position bias tensor of shape (1, n_heads, qlen, klen)
        return torch.randn(1, self.n_heads, qlen, klen)
    
    def forward(self, input, mask=None, kv=None, position_bias=None, past_key_value_state=None, head_mask=None, query_length=None, use_cache=False, output_attentions=False):
        return cross_attention_forward(self, input, mask, kv, position_bias, past_key_value_state, head_mask, query_length, use_cache, output_attentions)

def cross_attention_forward(self, input, mask=None, kv=None, position_bias=None, past_key_value_state=None, head_mask=None, query_length=None, use_cache=False, output_attentions=False):
    """
    This only works for computing cross attention over the input
    """
    assert kv != None
    assert head_mask == None
    assert position_bias != None or self.has_relative_attention_bias
    bsz, qlen, dim = input.size()
    n_heads, d_heads = (self.n_heads, self.d_kv)
    klen = kv.size(1)
    q = self.q(input).view(bsz, -1, n_heads, d_heads).transpose(1, 2)
    if past_key_value_state == None:
        k = self.k(kv).view(bsz, -1, n_heads, d_heads).transpose(1, 2)
        v = self.v(kv).view(bsz, -1, n_heads, d_heads).transpose(1, 2)
    else:
        k, v = past_key_value_state
    scores = torch.einsum('bnqd,bnkd->bnqk', q, k)
    if mask is not None:
        scores += mask
    if position_bias is None:
        position_bias = self.compute_bias(qlen, klen)
    scores += position_bias
    if self.score_storage is None:
        self.score_storage = scores
    attn = F.softmax(scores.float(), dim=-1).type_as(scores)
    attn = F.dropout(attn, p=self.dropout, training=self.training)
    output = torch.matmul(attn, v)
    output = output.transpose(1, 2).contiguous().view(bsz, -1, self.inner_dim)
    output = self.o(output)
    if use_cache:
        output = (output,) + ((k, v),)
    else:
        output = (output,) + (None,)
    if output_attentions:
        output = output + (attn,)
    if self.has_relative_attention_bias:
        output = output + (position_bias,)
    return output

# Create the module instance
self_module = CrossAttentionModule()

# Create input tensors
bsz = 2
qlen = 5
input_dim = 8
klen = 7
kv_dim = 10

input_tensor = torch.randn(bsz, qlen, input_dim)
kv_tensor = torch.randn(bsz, klen, kv_dim)

# Create position_bias (1, n_heads, qlen, klen)
position_bias_tensor = torch.randn(1, self_module.n_heads, qlen, klen)

# Create mask (broadcastable to scores shape: bsz, n_heads, qlen, klen)
mask_tensor = torch.randn(1, 1, qlen, klen)

ARGS = {
    'self': self_module,
    'input': input_tensor,
    'mask': mask_tensor,
    'kv': kv_tensor,
    'position_bias': position_bias_tensor,
    'past_key_value_state': None,
    'head_mask': None,
    'query_length': None,
    'use_cache': False,
    'output_attentions': False
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
encode_passages Ran
ran, honoured the contract we drafted
hackerchenzhuo/LaKo/src/data.py
code served (permissive licence) · get_code("bc0dae797248182b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 4, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

class StandInTokenizer:
    def batch_encode_plus(self, texts, max_length=None, pad_to_max_length=False, return_tensors=None, truncation=False):
        # Simulate tokenizer output
        batch_size = len(texts)
        seq_length = max_length if max_length else 10
        input_ids = torch.randint(0, 1000, (batch_size, seq_length))
        attention_mask = torch.ones(batch_size, seq_length, dtype=torch.long)
        
        result = {
            'input_ids': input_ids,
            'attention_mask': attention_mask
        }
        return result

# Create batch_text_passages: list of lists of strings
# Outer list has 2 items (batch), each item is a list of 3 text passages
batch_text_passages = [
    ["passage one text", "passage two text", "passage three text"],
    ["passage four text", "passage five text", "passage six text"]
]

tokenizer = StandInTokenizer()

max_length = 10

ARGS = {
    "batch_text_passages": batch_text_passages,
    "tokenizer": tokenizer,
    "max_length": max_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_pos_triples Ran
ran on a synthesized input
zjukg/snag/SNAG_MMEA/model/MSNEA_tools.py
code served (permissive licence) · get_code("681342822f804578")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function: it uses triples as a list/sequence that supports:
# - len(triples)
# - slicing triples[start:end]
# - addition with += (concatenation)
# So triples should be a list of items

# Create a small list of triples (each triple could be any object)
# For knowledge graph triples, typically (head, relation, tail)
triples = [
    ("entity_0", "rel_0", "entity_1"),
    ("entity_1", "rel_1", "entity_2"),
    ("entity_2", "rel_2", "entity_3"),
    ("entity_3", "rel_0", "entity_4"),
    ("entity_4", "rel_1", "entity_5"),
    ("entity_5", "rel_2", "entity_0"),
]

batch_size = 2
step = 0
is_fixed_size = False

ARGS = {
    "triples": triples,
    "batch_size": batch_size,
    "step": step,
    "is_fixed_size": is_fixed_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_relation_triple_batch Ran
ran on a synthesized input
zjukg/snag/SNAG_MMEA/model/MSNEA_tools.py
code served (permissive licence) · get_code("bda2af2880f66879")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random
import numpy as np

# Set seed for reproducibility
random.seed(0)
np.random.seed(0)

# Create small test data
# Entities: 0, 1, 2, 3, 4
# Relations: 0, 1
# Create triples as (head, relation, tail) tuples

entity_list1 = [0, 1, 2, 3]
entity_list2 = [1, 2, 3, 4]

# Create small triple lists for dataset 1
triple_list1 = [
    (0, 0, 1),
    (1, 0, 2),
    (2, 1, 3),
    (0, 1, 3),
]

# Create small triple lists for dataset 2
triple_list2 = [
    (1, 0, 2),
    (2, 0, 3),
    (3, 1, 4),
    (1, 1, 4),
]

# Create sets for efficient lookup in generate_neg_triples_fast
triple_set1 = set(triple_list1)
triple_set2 = set(triple_list2)

# Parameters for the function
batch_size = 4
step = 0
neg_triples_num = 2

ARGS = {
    "triple_list1": triple_list1,
    "triple_list2": triple_list2,
    "triple_set1": triple_set1,
    "triple_set2": triple_set2,
    "entity_list1": entity_list1,
    "entity_list2": entity_list2,
    "batch_size": batch_size,
    "step": step,
    "neg_triples_num": neg_triples_num,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
has_answer Ran
ran, violated the contract we drafted
hackerchenzhuo/LaKo/src/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/contriever, is pointer only (licence: NOASSERTION) · get_code("fa4ecbff4b9a354b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/contriever, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

l2norm Ran
ran on a synthesized input
zjukg/snag/SNAG_MMEA/model/EVA_tools.py
code served (permissive licence) · get_code("433bcbe46a942d69")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor with shape (2, 4)
# batch_size=2, feature_dim=4
X = torch.randn(2, 4)

ARGS = {
    "X": X
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_data Ran
ran; our contract draft was wrong, not the code
hackerchenzhuo/LaKo/src/data.py
code served (permissive licence) · get_code("0ec5a25ad1d89cc8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create temporary JSON files for testing
temp_dir = tempfile.mkdtemp()

# Create a .json file
json_file = os.path.join(temp_dir, "data.json")
json_data = [
    {"fact": [{"text": "fact1"}, {"text": "fact2"}]},
    {"fact": [{"text": "fact3"}]},
]
with open(json_file, 'w') as f:
    json.dump(json_data, f)

# Create a .jsonl file
jsonl_file = os.path.join(temp_dir, "data.jsonl")
with open(jsonl_file, 'w') as f:
    f.write(json.dumps({"fact": [{"text": "fact1"}, {"text": "fact2"}]}) + "\n")
    f.write(json.dumps({"fact": [{"text": "fact3"}]}) + "\n")

ARGS = {
    "data_path": json_file,
    "global_rank": -1,
    "world_size": -1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
select_examples_NQ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hackerchenzhuo/LaKo/src/preprocess.py
code served (permissive licence) · get_code("e2f8b9900fd662b1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Analyze function usage:
# - data: indexed with k (integer), accessed with data[k]['question'] and data[k]['answer']
# - index: iterable of integers k
# - passages: indexed with idx (integer), accessed as passages[idx][0] and passages[idx][1]
# - passages_index: dict-like, accessed with str(i) as key, returns iterable of idx values

# Build small stand-in data structures
data = {
    0: {'question': 'What is AI?', 'answer': ['Artificial Intelligence']},
    1: {'question': 'What is ML?', 'answer': ['Machine Learning']},
}

index = [0, 1]

passages = {
    0: ('First passage text about AI', 'AI Title'),
    1: ('Second passage text about ML', 'ML Title'),
    2: ('Third passage text', 'Third Title'),
}

passages_index = {
    '0': [0, 1],
    '1': [2],
}

ARGS = {
    'data': data,
    'index': index,
    'passages': passages,
    'passages_index': passages_index,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
select_examples_TQA Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hackerchenzhuo/LaKo/src/preprocess.py
code served (permissive licence) · get_code("e544cd4b39e5ec61")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct the 'data' parameter - a list of dicts with question/answer structure
data = [
    {
        'Question': 'What is the capital of France?',
        'QuestionId': 'q1',
        'Answer': {
            'Value': 'PARIS',
            'Aliases': ['Paris', 'paris']
        }
    },
    {
        'Question': 'What is the largest planet?',
        'QuestionId': 'q2',
        'Answer': {
            'Value': 'Jupiter',
            'Aliases': ['Jupiter', 'jupiter', 'JUPITER']
        }
    },
    {
        'Question': 'What is 2+2?',
        'QuestionId': 'q3',
        'Answer': {
            'Value': 'FOUR',
            'Aliases': ['four', '4']
        }
    }
]

# Construct the 'index' parameter - indices to select from data
index = [0, 2]

# Construct the 'passages' parameter - list of [text, title] pairs
passages = [
    ['Paris is the capital and most populous city of France.', 'Paris'],
    ['Jupiter is the fifth planet from the Sun.', 'Jupiter'],
    ['Two plus two equals four.', 'Arithmetic'],
    ['Additional passage text here.', 'Extra']
]

# Construct the 'passages_index' parameter - maps QuestionId to list of passage indices
passages_index = {
    'q1': [0, 1],
    'q2': [1, 2],
    'q3': [2, 3]
}

ARGS = {
    'data': data,
    'index': index,
    'passages': passages,
    'passages_index': passages_index
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tile_2d_over_nd Ran
ran; our contract draft was wrong, not the code
China-UK-ZSL/ZS-F-VQA/code/model/attention.py
code served (permissive licence) · get_code("b70265fc26e335dc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a feature vector with shape (batch_size=2, num_features=4)
feature_vector = torch.randn(2, 4)

# Create a feature map with shape (batch_size=2, num_features=4, height=3, width=5)
# This is a 2D feature map (spatial_size = 2)
feature_map = torch.randn(2, 4, 3, 5)

ARGS = {
    "feature_vector": feature_vector,
    "feature_map": feature_map,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_matches Not yet run
unverified (harvested, no recorded run)
hackerchenzhuo/LaKo/src/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/contriever, is pointer only (licence: NOASSERTION) · get_code("7a4988952dd3a127")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/contriever, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

generate_neg_triples_fast Not yet run
unverified (harvested, no recorded run)
zjukg/snag/SNAG_MMEA/model/MSNEA_tools.py
code served (permissive licence) · get_code("b107f7a819444b4f")
How it ran

no invocation recorded.

get_options Not yet run
unverified (harvested, no recorded run)
hackerchenzhuo/LaKo/src/options.py
code served (permissive licence) · get_code("b4e32355db15fe9f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 7 the same month, 6 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
calculate_matches 13 other papers
3 dated earlier, 3 the same month, 7 later
2112.08688 (2021-12)
Evidentiality-guided Generation for Knowledge-Intensive NLP Tasks
2401.03568 (2024-01)
Agent AI: Surveying the Horizons of Multimodal Interaction
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
and 10 more not named here
check_answer 13 other papers
3 dated earlier, 3 the same month, 7 later
2112.08688 (2021-12)
Evidentiality-guided Generation for Knowledge-Intensive NLP Tasks
2401.03568 (2024-01)
Agent AI: Surveying the Horizons of Multimodal Interaction
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
and 10 more not named here
cosine_sim 12 other papers
12 dated earlier
1707.05612 (2017-07)
VSE++: Improving Visual-Semantic Embeddings with Hard Negatives
1806.10348 (2018-06)
Learning Visually-Grounded Semantics from Contrastive Adversarial Samples
1809.06181 (2018-09)
Dual Encoding for Zero-Example Video Retrieval
and 9 more not named here
has_answer 11 other papers
3 dated earlier, 2 the same month, 6 later
2112.08688 (2021-12)
Evidentiality-guided Generation for Knowledge-Intensive NLP Tasks
2401.03568 (2024-01)
Agent AI: Surveying the Horizons of Multimodal Interaction
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
and 8 more not named here
cross_attention_forward 10 other papers
6 dated earlier, 1 the same month, 3 later · 1 only as an assembly brick
2108.06314 (2021-08)
A Dataset for Answering Time-Sensitive Questions
2112.08688 (2021-12)
Evidentiality-guided Generation for Knowledge-Intensive NLP Tasks
2206.15474 (2022-06)
Forecasting Future World Events with Neural Networks
and 7 more not named here
attention 4 other papers
3 dated earlier, 1 later
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment
2202.04298 (2022-02)
Image Difference Captioning with Pre-training and Contrastive Learning
and 1 more not named here
encode_passages 4 other papers
3 dated earlier, 1 the same month
2112.08688 (2021-12)
Evidentiality-guided Generation for Knowledge-Intensive NLP Tasks
2401.03568 (2024-01)
Agent AI: Surveying the Horizons of Multimodal Interaction
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
and 1 more not named here
get_options 4 other papers
2 dated earlier, 2 later
2112.08688 (2021-12)
Evidentiality-guided Generation for Knowledge-Intensive NLP Tasks
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
2403.06095 (2024-03)
RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completion
and 1 more not named here
select_examples_NQ 3 other papers
2 dated earlier, 1 the same month
2112.08688 (2021-12)
Evidentiality-guided Generation for Knowledge-Intensive NLP Tasks
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
2402.02503 (2024-02)
GeReA: Question-Aware Prompt Captions for Knowledge-based Visual Question Answering
select_examples_TQA 3 other papers
2 dated earlier, 1 the same month
2112.08688 (2021-12)
Evidentiality-guided Generation for Knowledge-Intensive NLP Tasks
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
2402.02503 (2024-02)
GeReA: Question-Aware Prompt Captions for Knowledge-based Visual Question Answering
l2norm 2 other papers
2 dated earlier
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment
2209.00891 (2022-09)
Multi-modal Contrastive Representation Learning for Entity Alignment
tile_2d_over_nd 1 other paper
1 dated earlier
1704.03162 (2017-04)
Show, Ask, Attend, and Answer: A Strong Baseline For Visual Question Answering

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Knowledge Graphs (KGs) play a pivotal role in advancing various AI applications, with the semantic web community's exploration into multi-modal dimensions unlocking new avenues for innovation. In this survey, we carefully review over 300 articles, focusing on KG-aware research in two principal aspects: KG-driven Multi-Modal (KG4MM) learning, where KGs support multi-modal tasks, and Multi-Modal Knowledge Graph (MM4KG), which extends KG studies into the MMKG realm. We begin by defining KGs and MMKGs, then explore their construction progress. Our review includes two primary task categories: KG-aware multi-modal learning tasks, such as Image Classification and Visual Question Answering, and intrinsic MMKG tasks like Multi-modal Knowledge Graph Completion and Entity Alignment, highlighting specific research trajectories. For most of these tasks, we provide definitions, evaluation benchmarks, and additionally outline essential insights for conducting relevant research. Finally, we discuss current challenges and identify emerging trends, such as progress in Large Language Modeling and Multi-modal Pre-training strategies. This survey aims to serve as a comprehensive reference for researchers already involved in or considering delving into KG and multi-modal learning research, offering insights into the evolving landscape of MMKG research and supporting future work.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.05391")
get_code_for_paper("2402.05391")
have("2402.05391")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2402.05391.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2402.05391.svg)](https://syntology.ai/paper/2402.05391)

Connect an agent — have() is free.