SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.09651 · 2022

Cross-Lingual Retrieval Augmented Prompt for Low-Resource Languages

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 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 3 have no contract verdict; 0 failures of our instrument; 4 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/2212.09651.json · badge: /api/ran/2212.09651.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
ercong21/parc canonical (classifier label)
classifier basis not recorded on the link
3 ran · 4 no recorded run
FunctionStatusWhere it lives
cal_sim_score Ran
ran on a synthesized input
ercong21/parc/lang_feat.py
code served (permissive licence) · get_code("603b4d3328577d3a")
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 float, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - sims: dict-like object with feature keys, values are numeric (used with *)
# - weights: dict-like object with feature keys, values are numeric (used with *)
# - features: iterable of feature identifiers

# Create sample data
sims = {
    'feature_1': 0.8,
    'feature_2': 0.6,
    'feature_3': 0.9,
}

weights = {
    'feature_1': 0.5,
    'feature_2': 0.3,
    'feature_3': 0.2,
}

features = ['feature_1', 'feature_2', 'feature_3']

ARGS = {
    'sims': sims,
    'weights': weights,
    'features': features,
}
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 float, 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
compute_similarity Ran
ran on a synthesized input
ercong21/parc/measure_trans_quality.py
code served (permissive licence) · get_code("1e0f06075baf5eee")
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 float32, 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
import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleEncoder(nn.Module):
    def __init__(self, output_dim=4):
        super().__init__()
        self.output_dim = output_dim
    
    def encode(self, texts):
        # Return a numpy array of embeddings
        # texts is a list, return shape (len(texts), output_dim)
        batch_size = len(texts) if isinstance(texts, list) else 1
        embeddings = np.random.randn(batch_size, self.output_dim).astype(np.float32)
        return embeddings

model = SimpleEncoder(output_dim=4)

ref_set = ["reference text one", "reference text two"]
hypo_set = ["hypothesis text one", "hypothesis text two"]

ARGS = {
    "ref_set": ref_set,
    "hypo_set": hypo_set,
    "model": model
}
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 float32, 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
cosine_similarity Ran
ran on a synthesized input
ercong21/parc/lang_feat.py
code served (permissive licence) · get_code("e43c571b97d3e868")
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 2, dtype family float, shape (2, 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 numpy as np

# Create two embedding matrices with distinct dimensions
# emb1: (2, 4) - 2 embeddings of dimension 4
# emb2: (3, 4) - 3 embeddings of dimension 4
emb1 = np.random.randn(2, 4).astype(np.float32)
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 — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
compute_bleu_chrf Not yet run
unverified (harvested, no recorded run)
ercong21/parc/measure_trans_quality.py
code served (permissive licence) · get_code("a5dd4cd1cb87109c")
How it ran

no invocation recorded.

create_datasets Not yet run
unverified (harvested, no recorded run)
ercong21/parc/measure_trans_quality.py
code served (permissive licence) · get_code("72a5dcad3d519d9a")
How it ran

no invocation recorded.

get_logger Not yet run
unverified (harvested, no recorded run)
ercong21/parc/log.py
code served (permissive licence) · get_code("dfdabda1fafd3d9e")
How it ran

no invocation recorded.

get_verbalization_ids Not yet run
unverified (harvested, no recorded run)
ercong21/parc/utils.py
code served (permissive licence) · get_code("a2f56ac3c4842462")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 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
get_logger 4 other papers
3 dated earlier, 1 later
1904.01617 (2019-04)
Attentive Mimicking: Better Word Embeddings by Attending to Informative Contexts
2110.01256 (2021-10)
Revisiting Self-Training for Few-Shot Learning of Language Model
2211.07349 (2022-11)
Finding Skill Neurons in Pre-trained Transformer-based Language Models
and 1 more not named here

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

Multilingual Pretrained Language Models (MPLMs) have shown their strong multilinguality in recent empirical cross-lingual transfer studies. In this paper, we propose the Prompts Augmented by Retrieval Crosslingually (PARC) pipeline to improve the zero-shot performance on low-resource languages (LRLs) by augmenting the context with semantically similar sentences retrieved from a high-resource language (HRL) as prompts. PARC improves the zero-shot performance on three downstream tasks (binary sentiment classification, topic categorization and natural language inference) with multilingual parallel test sets across 10 LRLs covering 6 language families in both unlabeled settings (+5.1%) and labeled settings (+16.3%). PARC-labeled also outperforms the finetuning baseline by 3.7%. We find a significant positive correlation between cross-lingual transfer performance on one side, and the similarity between the high- and low-resource languages as well as the amount of low-resource pretraining data on the other side. A robustness analysis suggests that PARC has the potential to achieve even stronger performance with more powerful MPLMs.

For agents

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

get_harvested_code_for_paper("2212.09651")
get_code_for_paper("2212.09651")
have("2212.09651")

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

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

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

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

Connect an agent — have() is free.