SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.07424 · 2024

MINERS: Multilingual Language Models as Semantic Retrievers

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 3 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 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/2406.07424.json · badge: /api/ran/2406.07424.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
gentaiscool/miners canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
argmax Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gentaiscool/miners/icl.py
code served (permissive licence) · get_code("1d233f39e0fd58dd")
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 int64, 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
import hashlib

def argmax(array):
    """argmax with deterministic pseudorandom tie breaking."""
    max_indices = np.arange(len(array))[array == np.max(array)]
    idx = int(hashlib.sha256(np.asarray(array).tobytes()).hexdigest(), 16) % len(max_indices)
    return max_indices[idx]


# Create a small numpy array with some values
# Include a case where there are ties (multiple max values) to test the tie-breaking logic
array = np.array([1.0, 5.0, 3.0, 5.0, 2.0])

ARGS = {
    "array": array
}
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 int64, 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
evaluate_bitext_mining Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gentaiscool/miners/bitext.py
code served (permissive licence) · get_code("5c5225ec7c94e346")
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 2, dtype family int; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# The function expects:
# - source_embeddings: array-like with len() and indexing, elements are array-like
# - target_embeddings: array-like with len() and indexing, elements are array-like
# - k: integer

# Create small embedding arrays
# source_embeddings: list of embedding vectors (each is 1D array-like)
# target_embeddings: list of embedding vectors (each is 1D array-like)

embedding_dim = 4
num_source = 2
num_target = 3

# Create source embeddings as numpy arrays
source_embeddings = [np.random.randn(embedding_dim).astype(np.float32) for _ in range(num_source)]

# Create target embeddings as numpy arrays
target_embeddings = [np.random.randn(embedding_dim).astype(np.float32) for _ in range(num_target)]

k = 2

ARGS = {
    "source_embeddings": source_embeddings,
    "target_embeddings": target_embeddings,
    "k": k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
evaluate_bitext_mining Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gentaiscool/miners/bitext_ensemble.py
code served (permissive licence) · get_code("4643906af527fdf1")
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 2, dtype family int; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create small embeddings for testing
# source_embeddings_all_models: list of lists of embeddings
# Each model has a list of source embeddings
num_models = 2
num_source_samples = 5
num_target_samples = 6
embedding_dim = 4

source_embeddings_all_models = []
target_embeddings_all_models = []

for model_id in range(num_models):
    # Create source embeddings (list of numpy arrays)
    source_embeddings = [np.random.randn(embedding_dim).astype(np.float32) for _ in range(num_source_samples)]
    source_embeddings_all_models.append(source_embeddings)
    
    # Create target embeddings (list of numpy arrays)
    target_embeddings = [np.random.randn(embedding_dim).astype(np.float32) for _ in range(num_target_samples)]
    target_embeddings_all_models.append(target_embeddings)

k = 3
weights = [1.0, 0.8]

ARGS = {
    "source_embeddings_all_models": source_embeddings_all_models,
    "target_embeddings_all_models": target_embeddings_all_models,
    "k": k,
    "weights": weights
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
evaluate_classification Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gentaiscool/miners/classification.py
code served (permissive licence) · get_code("73e0a652d3ec6ca9")
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 int; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create small toy data for the function
# train_embeddings: list of embedding vectors
# test_embeddings: list of embedding vectors
# train_labels: list of class labels
# k: number of nearest neighbors

num_train = 8
num_test = 3
embedding_dim = 4

# Create training embeddings as a list of numpy arrays or lists
train_embeddings = [np.random.randn(embedding_dim).tolist() for _ in range(num_train)]

# Create test embeddings as a list of numpy arrays or lists
test_embeddings = [np.random.randn(embedding_dim).tolist() for _ in range(num_test)]

# Create training labels (class indices)
train_labels = [0, 1, 0, 1, 0, 1, 0, 1]

# k value for k-NN
k = 3

ARGS = {
    'train_embeddings': train_embeddings,
    'test_embeddings': test_embeddings,
    'train_labels': train_labels,
    'k': k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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 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
evaluate_classification Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gentaiscool/miners/classification_ensemble.py
code served (permissive licence) · get_code("dd6254a6573baa16")
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 int; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Small mock embeddings and labels for testing
num_models = 2
num_train_samples = 10
num_test_samples = 3
embedding_dim = 4

# Create train embeddings for each model checkpoint
train_embeddings_all_models = [
    np.random.randn(num_train_samples, embedding_dim).astype(np.float32)
    for _ in range(num_models)
]

# Create test embeddings for each model checkpoint
test_embeddings_all_models = [
    np.random.randn(num_test_samples, embedding_dim).astype(np.float32)
    for _ in range(num_models)
]

# Create training labels (class indices)
train_labels = [i % 3 for i in range(num_train_samples)]

# k parameter for k-NN
k = 3

# Weights for each model checkpoint
weights = [0.5, 0.5]

ARGS = {
    'train_embeddings_all_models': train_embeddings_all_models,
    'test_embeddings_all_models': test_embeddings_all_models,
    'train_labels': train_labels,
    'k': k,
    'weights': weights,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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 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
get_cohere_embedding Ran
ran, honoured the contract we drafted
gentaiscool/miners/bitext.py
code served (permissive licence) · get_code("bae8ecac288828c5")
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
import torch.nn as nn


class MockCohereModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 4)
    
    def embed(self, texts, model, input_type):
        # Mock embedding response object
        class EmbeddingResponse:
            def __init__(self, embeddings):
                self.embeddings = embeddings
        
        # Return mock embeddings with shape (num_texts, embedding_dim)
        num_texts = len(texts)
        embeddings = self.linear(torch.randn(num_texts, 10))
        return EmbeddingResponse(embeddings)


torch.manual_seed(0)

model = MockCohereModel()
texts = ["hello world", "test query"]
model_checkpoint = "embed-english-v3.0"

ARGS = {
    "model": model,
    "texts": texts,
    "model_checkpoint": model_checkpoint,
}
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
get_openai_embedding Ran
ran, honoured the contract we drafted
gentaiscool/miners/bitext.py
code served (permissive licence) · get_code("89976ba52f51bd6e")
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 torch.nn as nn
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock OpenAI client that returns embeddings
class MockEmbedding:
    def __init__(self, embedding):
        self.embedding = embedding

class MockEmbeddingResponse:
    def __init__(self, embeddings_list):
        self.data = [MockEmbedding(emb) for emb in embeddings_list]

class MockEmbeddingsAPI:
    def create(self, input, model):
        # Return mock embeddings for each text
        if isinstance(input, str):
            texts_count = 1
        else:
            texts_count = len(input)
        # Create small embeddings (dim=4)
        embeddings_list = [torch.randn(4).tolist() for _ in range(texts_count)]
        return MockEmbeddingResponse(embeddings_list)

class MockModel:
    def __init__(self):
        self.embeddings = MockEmbeddingsAPI()

model = MockModel()

texts = ["hello world", "test embedding"]

checkpoint = "text-embedding-3-large"

ARGS = {
    "model": model,
    "texts": texts,
    "checkpoint": checkpoint,
}
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 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
logsumexp Ran
ran, honoured the contract we drafted
gentaiscool/miners/icl.py
code served (permissive licence) · get_code("80c5aec8fadb2125")
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; 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

# The function logsumexp takes a single parameter 'x' which should be a numpy array
# It calls .max() on x, np.log, np.sum, and np.exp
# So x needs to be a numpy array of numeric values

x = np.array([1.0, 2.5, 3.2, 0.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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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 Ran
ran, violated the contract we drafted
gentaiscool/miners/icl.py
code served (permissive licence) · get_code("f15777c5ca784848")
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 ndarray, ndim 1, dtype family float, shape (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 numpy as np

# The function 'normalize' takes a single parameter 'x' which should be array-like
# It converts x to a numpy array and applies logsumexp normalization
# We need to provide a small numpy array or list of numbers

# Create a small test array
x_input = np.array([1.0, 2.0, 3.0, 4.0])

ARGS = {
    'x': x_input
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (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
get_tokenized_dataset Not yet run
unverified (harvested, no recorded run)
gentaiscool/miners/finetune_baseline.py
code served (permissive licence) · get_code("a0e1f45f8c77f2ec")
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, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 1 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.

FunctionAlso present inEarliest-datedOthers named
argmax 2 other papers
1 the same month, 1 same year, order not determinable
2024.findings-emnlp.86 (2024 (year only))
Tokenization Falling Short: On Subword Robustness in Large Language Models
2406.11687 (2024-06)
Tokenization Falling Short: On Subword Robustness in Large Language Models

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

Words have been represented in a high-dimensional vector space that encodes their semantic similarities, enabling downstream applications such as retrieving synonyms, antonyms, and relevant contexts. However, despite recent advances in multilingual language models (LMs), the effectiveness of these models' representations in semantic retrieval contexts has not been comprehensively explored. To fill this gap, this paper introduces the MINERS, a benchmark designed to evaluate the ability of multilingual LMs in semantic retrieval tasks, including bitext mining and classification via retrieval-augmented contexts. We create a comprehensive framework to assess the robustness of LMs in retrieving samples across over 200 diverse languages, including extremely low-resource languages in challenging cross-lingual and code-switching settings. Our results demonstrate that by solely retrieving semantically similar embeddings yields performance competitive with state-of-the-art approaches, without requiring any fine-tuning.

For agents

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

get_harvested_code_for_paper("2406.07424")
get_code_for_paper("2406.07424")
have("2406.07424")

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

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

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

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

Connect an agent — have() is free.