SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1812.10464 · 2018

Massively Multilingual Sentence Embeddings for Zero-Shot Cross-Lingual Transfer and Beyond

arXiv · PDF · Open in the Atlas

Code that ran

10 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; 2 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 2 failures of our instrument; 0 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/1812.10464.json · badge: /api/ran/1812.10464.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
yannvgn/laserembeddings community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
LawrenceDuan/myLASER reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
raymondhs/fairseq-laser community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
transducens/LASERtrain reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
BuccExtract Ran
ran; our contract draft was wrong, not the code
LawrenceDuan/myLASER/tasks/bucc/bucc.py
pointer only (licence: NOASSERTION) · get_code("5e3abc8abc7e1ba3")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, LawrenceDuan/myLASER (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.

BuccOptimize Ran
ran, honoured the contract we drafted
LawrenceDuan/myLASER/tasks/bucc/bucc.py
pointer only (licence: NOASSERTION) · get_code("ff90acbe13627868")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, LawrenceDuan/myLASER (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.

adapt_bpe_codes Ran
ran on a synthesized input
yannvgn/laserembeddings/laserembeddings/utils.py
code served (permissive licence) · get_code("13a068cfdda041fe")
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 StringIO. 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.

from io import TextIOBase, StringIO
import re

# Create a sample fastBPE codes file content
fastbpe_codes_content = """a b 100
c d 95
e f 90
g h 85"""

# Create a StringIO object that acts like a text-mode file
bpe_codes_input = StringIO(fastbpe_codes_content)

ARGS = {
    "bpe_codes_f": bpe_codes_input
}
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 StringIO — a StringIO 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
add_decoder_language Ran
ran on a synthesized input
raymondhs/fairseq-laser/laser/laser_dataset.py
code served (permissive licence) · get_code("ccb4f61614cf3799")
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

torch.manual_seed(0)

# The function expects:
# 1. batch: a dict with 'net_input' key containing a dict
# 2. lang_pair: a string with format like 'en-fr' that can be split by '-'

batch = {
    'net_input': {},
    'other_key': 'other_value'
}

lang_pair = 'en-fr'

ARGS = {
    'batch': batch,
    'lang_pair': lang_pair
}
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 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
buffered_arange Ran
ran, honoured the contract we drafted
transducens/LASERtrain/fairseq-modules/multilingual_lstm_laser.py
pointer only (licence: NONE) · get_code("b635d11e8b643e36")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, transducens/LASERtrain 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.

buffered_arange Ran
ran on a synthesized input
yannvgn/laserembeddings/laserembeddings/encoder.py
code served (permissive licence) · get_code("b2ad3933e6341902")
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 1, dtype family int, shape (10,) 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)

ARGS = {
    'max': 10
}
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 1, dtype family int, shape (10,) — shape (10,) 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
convert_padding_direction Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
transducens/LASERtrain/fairseq-modules/multilingual_lstm_laser.py
pointer only (licence: NONE) · get_code("6031a95f9f326ac7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, transducens/LASERtrain 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.

convert_padding_direction Ran
ran on a synthesized input
yannvgn/laserembeddings/laserembeddings/encoder.py
code served (permissive licence) · get_code("19403a190ad0b624")
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 int, 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 src_tokens: batch_size=2, sequence_length=4
# Contains token indices with some padding tokens mixed in
src_tokens = torch.tensor([
    [10, 11, 0, 12],  # padding token (0) at position 2
    [20, 0, 0, 21]    # padding tokens (0) at positions 1, 2
], dtype=torch.long)

# padding_idx is the token index that represents padding
padding_idx = 0

# right_to_left and left_to_right are mutually exclusive boolean flags
right_to_left = True
left_to_right = False

ARGS = {
    'src_tokens': src_tokens,
    'padding_idx': padding_idx,
    'right_to_left': right_to_left,
    'left_to_right': left_to_right
}
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 int, 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
non_win_string Ran
ran on a synthesized input
yannvgn/laserembeddings/laserembeddings/__main__.py
code served (permissive licence) · get_code("9bb263aefc7737cf")
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 str. 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 os

IS_WIN = os.name == 'nt'

def non_win_string(s):
    return s if not IS_WIN else ''

# The function takes a single parameter 's' which is a string
# It returns the string as-is on non-Windows systems, or an empty string on Windows
# We need to provide a valid string argument

ARGS = {
    's': 'test_string'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
uniform_sampler Ran
ran on a synthesized input
raymondhs/fairseq-laser/laser/laser_dataset.py
code served (permissive licence) · get_code("50e8df121d8ca072")
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 int, ndim 0, dtype family int, 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

def uniform_sampler(x):
    return np.random.choice(x, 1).item()

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

# x should be an array-like that np.random.choice can sample from
x = np.array([1, 2, 3, 4, 5])

ARGS = {
    "x": x
}
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 int, ndim 0, dtype family int, 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

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 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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

We introduce an architecture to learn joint multilingual sentence representations for 93 languages, belonging to more than 30 different families and written in 28 different scripts. Our system uses a single BiLSTM encoder with a shared BPE vocabulary for all languages, which is coupled with an auxiliary decoder and trained on publicly available parallel corpora. This enables us to learn a classifier on top of the resulting embeddings using English annotated data only, and transfer it to any of the 93 languages without any modification. Our experiments in cross-lingual natural language inference (XNLI dataset), cross-lingual document classification (MLDoc dataset) and parallel corpus mining (BUCC dataset) show the effectiveness of our approach. We also introduce a new test set of aligned sentences in 112 languages, and show that our sentence embeddings obtain strong results in multilingual similarity search even for low-resource languages. Our implementation, the pre-trained encoder and the multilingual test set are available at https://github.com/facebookresearch/LASER

For agents

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

get_harvested_code_for_paper("1812.10464")
get_code_for_paper("1812.10464")
have("1812.10464")

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

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

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

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

Connect an agent — have() is free.