SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.00891 · 2022

Multi-modal Contrastive Representation Learning for Entity Alignment

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2209.00891.json · badge: /api/ran/2209.00891.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
lzxlin/mclea canonical (classifier label)
classifier basis not recorded on the link
7 ran · 3 no recorded run
FunctionStatusWhere it lives
cosine_sim Ran
ran; our contract draft was wrong, not the code
lzxlin/mclea/src/models.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.

handle_rel_triples Ran
ran on a synthesized input
lzxlin/mclea/datapro/mmkb_convert.py
code served (permissive licence) · get_code("94d7383646036062")
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 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 os
import tempfile

# Create temporary directories for the test
temp_dir = tempfile.mkdtemp()
data_root_1 = os.path.join(temp_dir, 'dataset1')
data_root_2 = os.path.join(temp_dir, 'dataset2')
save_root = os.path.join(temp_dir, 'output')

os.makedirs(data_root_1, exist_ok=True)
os.makedirs(data_root_2, exist_ok=True)
os.makedirs(save_root, exist_ok=True)

# Create sample triple files for dataset1
triples_file_1 = os.path.join(data_root_1, 'dataset1_EntityTriples.txt')
with open(triples_file_1, 'w', encoding='utf-8') as f:
    f.write('entity1 relation1 entity2 0\n')
    f.write('entity2 relation2 entity3 0\n')
    f.write('entity3 relation1 entity1 0\n')

# Create sample triple files for dataset2
triples_file_2 = os.path.join(data_root_2, 'dataset2_EntityTriples.txt')
with open(triples_file_2, 'w', encoding='utf-8') as f:
    f.write('entity4 relation3 entity5 0\n')
    f.write('entity5 relation1 entity4 0\n')

# Create SameAsLink file for dataset2 (ids=2 case)
samelink_file_2 = os.path.join(data_root_2, 'dataset2_SameAsLink.txt')
with open(samelink_file_2, 'w', encoding='utf-8') as f:
    f.write('entity1 sameAs entity4 0\n')
    f.write('entity2 sameAs entity5 0\n')

# Create data paths list pointing to the triple files
data_paths = [triples_file_1, triples_file_2]

ARGS = {
    'data_paths': data_paths,
    'save_root': save_root,
}
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 tuple, ndim 1, dtype family float — 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
l2norm Ran
ran on a synthesized input
lzxlin/mclea/src/models.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
loadfile Ran
ran on a synthesized input
lzxlin/mclea/src/Load.py
code served (permissive licence) · get_code("4564d89c4036e373")
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 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 tempfile
import os

# Create a temporary file with tab-separated integer data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt', encoding='utf-8')
temp_file.write('1\t2\t3\n')
temp_file.write('4\t5\t6\n')
temp_file.write('7\t8\t9\n')
temp_file.close()

ARGS = {
    'fn': temp_file.name,
    'num': 2
}
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 2, dtype family int — 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
normalize_adj Ran
ran; our contract draft was wrong, not the code
lzxlin/mclea/src/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from triplej0079/DeepIM, is pointer only (licence: NONE) · get_code("d45f434d25f2e870")
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 triplej0079/DeepIM, 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.

normalize_features Ran
ran; our contract draft was wrong, not the code
lzxlin/mclea/src/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from WtaoZhao/GraphGLOW, is pointer only (licence: NONE) · get_code("39cba20da9f36113")
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 WtaoZhao/GraphGLOW, 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.

sparse_mx_to_torch_sparse_tensor Ran
ran on a synthesized input
lzxlin/mclea/src/utils.py
code served (permissive licence) · get_code("edf110cbd4fe5ec5")
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. 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 numpy as np
import torch
from scipy import sparse

torch.manual_seed(0)

# Create a small sparse matrix in COO format
row = np.array([0, 1, 2])
col = np.array([0, 1, 2])
data = np.array([1.0, 2.0, 3.0])
sparse_mx = sparse.coo_matrix((data, (row, col)), shape=(3, 4))

# Convert to another sparse format and back to ensure it's a valid scipy sparse matrix
sparse_mx = sparse_mx.tocsr().tocoo()

ARGS = {
    "sparse_mx": sparse_mx
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, shape (3, 4) — shape (3, 4) as a later run recorded it
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
get_ent2id Not yet run
unverified (harvested, no recorded run)
lzxlin/mclea/src/Load.py
code served (permissive licence) · get_code("bebaa42d5e2dcdf3")
How it ran

no invocation recorded.

get_ids Not yet run
unverified (harvested, no recorded run)
lzxlin/mclea/src/Load.py
code served (permissive licence) · get_code("7c1bdadfedbe321c")
How it ran

no invocation recorded.

handle_img_features Not yet run
unverified (harvested, no recorded run)
lzxlin/mclea/datapro/mmkb_convert.py
code served (permissive licence) · get_code("9463435937510fb7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 4 later) and 2 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
cosine_sim 12 other papers
6 dated earlier, 4 later, 2 same year, order not determinable
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
normalize_adj 7 other papers
4 dated earlier, 3 later
1710.10903 (2017-10)
Graph Attention Networks
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment
2109.14285 (2021-09)
Be Confident! Towards Trustworthy Graph Neural Networks via Confidence Calibration
and 4 more not named here
normalize_features 4 other papers
2 dated earlier, 2 later
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment
2112.14438 (2021-12)
Deformable Graph Convolutional Networks
2403.15520 (2024-03)
GTC: GNN-Transformer Co-contrastive Learning for Self-supervised Heterogeneous Graph Representation
and 1 more not named here
l2norm 2 other papers
1 dated earlier, 1 later
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment
2402.05391 (2024-02)
Knowledge Graphs Meet Multi-Modal Learning: A Comprehensive Survey
get_ent2id 1 other paper
1 dated earlier
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment
get_ids 1 other paper
1 dated earlier
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment
loadfile 1 other paper
1 dated earlier
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment
sparse_mx_to_torch_sparse_tensor 1 other paper
1 dated earlier
2009.13603 (2020-09)
Visual Pivoting for (Unsupervised) Entity Alignment

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-23.

Repositories linked to this paper

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

Abstract

Multi-modal entity alignment aims to identify equivalent entities between two different multi-modal knowledge graphs, which consist of structural triples and images associated with entities. Most previous works focus on how to utilize and encode information from different modalities, while it is not trivial to leverage multi-modal knowledge in entity alignment because of the modality heterogeneity. In this paper, we propose MCLEA, a Multi-modal Contrastive Learning based Entity Alignment model, to obtain effective joint representations for multi-modal entity alignment. Different from previous works, MCLEA considers task-oriented modality and models the inter-modal relationships for each entity representation. In particular, MCLEA firstly learns multiple individual representations from multiple modalities, and then performs contrastive learning to jointly model intra-modal and inter-modal interactions. Extensive experimental results show that MCLEA outperforms state-of-the-art baselines on public datasets under both supervised and unsupervised settings.

For agents

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

get_harvested_code_for_paper("2209.00891")
get_code_for_paper("2209.00891")
have("2209.00891")

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

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

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

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

Connect an agent — have() is free.