SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2211.06127 · EMNLP · 2022

English Contrastive Learning Can Learn Universal Cross-lingual Sentence Embeddings

Graham Neubig, Yau-Shian Wang, Ashley Wu

arXiv · PDF · Open in the Atlas

Code that ran

8 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, 1 violated it and 3 have no contract verdict; 4 failures of our instrument; 2 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/2211.06127.json · badge: /api/ran/2211.06127.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
yaushian/msimcse canonical (classifier label)
classifier basis not recorded on the link
8 ran · 2 no recorded run
FunctionStatusWhere it lives
bucc_f1 Ran
ran on a synthesized input
yaushian/msimcse/eval/evaluation_retrieval.py
code served (permissive licence) · get_code("1f2890fc24d46b56")
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 dict. 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)

# Analyze the function:
# - labels: should be a list/iterable of strings where each string can be split by '\t'
# - predictions: should be a list/iterable of strings where each string can be split by '\t'
# - language: optional parameter, not used in the function body

# The function expects tab-separated strings that will be converted to tuples
# Let's create realistic BUCC (Building a Multilingual Corpus) data
# Typically this would be parallel sentence pairs: id1 \t id2

labels = [
    "sent_1\tsent_1",
    "sent_2\tsent_2",
    "sent_3\tsent_3",
    "sent_4\tsent_4",
]

predictions = [
    "sent_1\tsent_1",
    "sent_2\tsent_2",
    "sent_3\tsent_5",  # This one is wrong
    "sent_6\tsent_6",  # This one is not in labels
]

language = "en-fr"

ARGS = {
    "labels": labels,
    "predictions": predictions,
    "language": language,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
cl_forward Ran
ran; our contract draft was wrong, not the code
yaushian/msimcse/simcse/models.py
pointer only (licence: MIT); the stored copy get_code serves, from yiren-jian/NonLing-CSE, is pointer only (licence: NONE) · get_code("4e0ff9c4d9a318ff")
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 yiren-jian/NonLing-CSE, 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.

cosine Ran
ran, violated the contract we drafted
yaushian/msimcse/eval/evaluation_xsts.py
code served (permissive licence) · get_code("a2a8999f1b9ffa71")
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 float64, ndim 0, dtype family float, shape () 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 numpy as np

# The cosine function takes two vectors u and v
# It computes their dot product and divides by the product of their norms
# Both u and v should be array-like (numpy arrays or lists that work with np.dot, np.linalg.norm)

u = np.array([1.0, 2.0, 3.0, 4.0])
v = np.array([5.0, 6.0, 7.0, 8.0])

ARGS = {
    "u": u,
    "v": v,
}
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 float64, ndim 0, dtype family float, shape () — shape () 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
knn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yaushian/msimcse/eval/utils_retrieve.py
pointer only (licence: MIT); the stored copy get_code serves, from fffffarmer/lsar, is pointer only (licence: NONE) · get_code("289930036c969424")
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 fffffarmer/lsar, 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.

knnCPU Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yaushian/msimcse/eval/utils_retrieve.py
pointer only (licence: MIT); the stored copy get_code serves, from fffffarmer/lsar, is pointer only (licence: NONE) · get_code("eb5ec5cdad6ee5ef")
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 fffffarmer/lsar, 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.

retrieval_eval Ran
ran on a synthesized input
yaushian/msimcse/eval/evaluation_retrieval.py
code served (permissive licence) · get_code("b77d7a9072629db7")
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 numpy as np

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

# Create small embedding matrices
# emb1: shape (2, 4) - 2 samples, 4 dimensions
emb1 = np.random.randn(2, 4).astype(np.float32)

# emb2: shape (3, 4) - 3 samples, 4 dimensions (different from emb1 to create retrieval scenario)
emb2 = np.random.randn(3, 4).astype(np.float32)

ARGS = {
    "emb1": emb1,
    "emb2": emb2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
sentemb_forward Ran
ran; our contract draft was wrong, not the code
yaushian/msimcse/simcse/models.py
pointer only (licence: MIT); the stored copy get_code serves, from yiren-jian/NonLing-CSE, is pointer only (licence: NONE) · get_code("cb67cd5ac977480d")
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 yiren-jian/NonLing-CSE, 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.

sts_eval Ran
ran on a synthesized input
yaushian/msimcse/eval/evaluation_xsts.py
code served (permissive licence) · get_code("17db4335e13b31ef")
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 numpy as np

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

# Create two small embedding matrices
# Shape: (batch_size=2, embedding_dim=4)
emb1 = np.random.randn(2, 4).astype(np.float32)
emb2 = np.random.randn(2, 4).astype(np.float32)

ARGS = {
    "emb1": emb1,
    "emb2": emb2,
}
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 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
bucc Not yet run
unverified (harvested, no recorded run)
yaushian/msimcse/eval/evaluation_retrieval.py
code served (permissive licence) · get_code("b009e9b0eacbc026")
How it ran

no invocation recorded.

knnGPU Not yet run
unverified (harvested, no recorded run)
yaushian/msimcse/eval/utils_retrieve.py
pointer only (licence: MIT); the stored copy get_code serves, from fffffarmer/lsar, is pointer only (licence: NONE) · get_code("beb48c917d26c694")
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 fffffarmer/lsar, 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. 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, 6 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 6 later) and 4 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
sentemb_forward 15 other papers
6 dated earlier, 9 later · 4 only as an assembly brick
1908.10084 (2019-08)
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
2104.08821 (2021-04)
SimCSE: Simple Contrastive Learning of Sentence Embeddings
2203.05877 (2022-03)
A Sentence is Worth 128 Pseudo Tokens: A Semantic-Aware Contrastive Learning Framework for Sentence Embeddings
and 12 more not named here
cl_forward 8 other papers
3 dated earlier, 5 later · 2 only as an assembly brick
1908.10084 (2019-08)
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
2104.08821 (2021-04)
SimCSE: Simple Contrastive Learning of Sentence Embeddings
2209.09433 (2022-09)
Non-Linguistic Supervision for Contrastive Learning of Sentence Embeddings
and 5 more not named here
cosine 5 other papers
3 dated earlier, 2 later
1905.07790 (2019-05)
Correlation Coefficients and Semantic Textual Similarity
1909.13872 (2019-09)
Simple and Effective Paraphrastic Similarity from Parallel Translations
2104.15114 (2021-04)
Paraphrastic Representations at Scale
and 2 more not named here
knn 1 other paper
1 later
2401.05792 (2024-01)
Discovering Low-rank Subspaces for Language-agnostic Multilingual Representations
knnCPU 1 other paper
1 later
2401.05792 (2024-01)
Discovering Low-rank Subspaces for Language-agnostic Multilingual Representations
knnGPU 1 other paper
1 later
2401.05792 (2024-01)
Discovering Low-rank Subspaces for Language-agnostic Multilingual Representations

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

Universal cross-lingual sentence embeddings map semantically similar cross-lingual sentences into a shared embedding space. Aligning cross-lingual sentence embeddings usually requires supervised cross-lingual parallel sentences. In this work, we propose mSimCSE, which extends SimCSE (Gao et al., 2021) to multilingual settings and reveal that contrastive learning on English data can surprisingly learn high-quality universal cross-lingual sentence embeddings without any parallel data. In unsupervised and weakly supervised settings, mSim-CSE significantly improves previous sentence embedding methods on cross-lingual retrieval and multilingual STS tasks. The performance of unsupervised mSimCSE is comparable to fully supervised methods in retrieving lowresource languages and multilingual STS. The performance can be further enhanced when cross-lingual NLI data is available. 1

For agents

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

get_harvested_code_for_paper("2211.06127")
get_code_for_paper("2211.06127")
have("2211.06127")

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

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

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

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

Connect an agent — have() is free.