SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2024.findings-emnlp.134 · EMNLP Findings · 2024

Learning to Paraphrase for Alignment with LLM Preference

Guoshuai Zhao, Xueming Qian, Junbo Fu, Yimin Deng, Yunqi Mi

Open in the Atlas

Code that ran

3 of 4 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 2 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-24; 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/2024.findings-emnlp.134.json · badge: /api/ran/2024.findings-emnlp.134.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
mosaicml/llm-foundry canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_named_averages Ran
ran on a synthesized input
mosaicml/llm-foundry/llmfoundry/callbacks/eval_gauntlet_callback.py
code served (permissive licence) · get_code("bb8e5af5f98c3622")
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)

# Construct arguments for calculate_named_averages
average_names = {
    "overall": ["math", "reading", "writing"],
    "stem": ["math", "science"],
    "humanities": ["reading", "writing", "history"]
}

category_scores = {
    "math": 85.5,
    "reading": 78.2,
    "writing": 82.1,
    "science": 88.3,
    "history": 76.9
}

ARGS = {
    "average_names": average_names,
    "category_scores": category_scores
}
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
get_eval_parameters Ran
ran on a synthesized input
mosaicml/llm-foundry/llmfoundry/callbacks/async_eval_callback.py
code served (permissive licence) · get_code("8fd07050095e3fd1")
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 torch.nn as nn
from typing import Any

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class SimpleTokenizer:
    def __init__(self):
        self.vocab_size = 100

class LoggerConfig:
    def __init__(self):
        pass

model_instance = SimpleModel()
tokenizer_instance = SimpleTokenizer()

parameters = {
    'device_eval_batch_size': 32,
    'icl_tasks': ['task1', 'task2'],
    'max_seq_len': 512,
    'model': {
        'name': 'test_model',
        'type': 'transformer',
        'hidden_size': 256
    },
    'tokenizer': {
        'vocab_size': 50000,
        'max_length': 512
    },
    'loggers': {
        'wandb': {
            'name': 'test_run',
            'project': 'test_project'
        }
    },
    'precision': 'fp32',
    'seed': 42,
    'python_log_level': 'INFO',
    'eval_subset_num_batches': 10,
    'icl_subset_num_batches': 5,
    'dist_timeout': 600,
    'eval_gauntlet': ['gauntlet1'],
    'eval_loader': [
        (torch.randn(2, 4), torch.randint(0, 2, (2,))),
        (torch.randn(2, 4), torch.randint(0, 2, (2,)))
    ],
    'fsdp_config': {
        'enabled': False
    }
}

ARGS = {
    'parameters': parameters,
    'checkpoint': '/tmp/checkpoint.pt',
    'training_run_name': 'training_run_001'
}
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
get_run_name Ran
ran; our contract draft was wrong, not the code
mosaicml/llm-foundry/llmfoundry/callbacks/async_eval_callback.py
code served (permissive licence) · get_code("37b437ca0eb633ca")
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 logging

log = logging.getLogger(__name__)

RUN_NAME_PREFIX = 'eval'
MAX_RUN_NAME_BASE_LENGTH = 55

def get_run_name(training_run_name: str, current_interval: str) -> str:
    """Get the new eval run name.

    Args:
        training_run_name: The name of the current training run
        current_interval: The current interval string of the training run

    Returns:
        The new run name
    """
    name_without_uuid_suffix = training_run_name.rsplit('-', 1)[0]
    max_length = MAX_RUN_NAME_BASE_LENGTH - len(RUN_NAME_PREFIX) - len(current_interval) - 2
    if len(name_without_uuid_suffix) > max_length:
        new_name = name_without_uuid_suffix[:max_length]
        log.warning(f'Training run name {name_without_uuid_suffix} may be too long,' + f' truncating to {new_name}')
        name_without_uuid_suffix = new_name
    return f'{RUN_NAME_PREFIX}-{current_interval}-{name_without_uuid_suffix}'


ARGS = {
    'training_run_name': 'my_training_run_experiment-abc123def456',
    'current_interval': 'step_1000'
}
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
download_from_oras Not yet run
unverified (harvested, no recorded run)
mosaicml/llm-foundry/llmfoundry/utils/model_download_utils.py
code served (permissive licence) · get_code("e4de64c981d5a750")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 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 3 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_run_name 1 other paper
1 same year, order not determinable
2405.15593 (2024-05)
MicroAdam: Accurate Adaptive Optimization with Low Space Overhead and Provable Convergence

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

Repositories linked to this paper

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

Abstract

Large Language Models (LLMs) exhibit the issue of paraphrase divergence. This means that when a question is phrased in a slightly different but semantically similar way, LLM may output a wrong response despite being able to answer the original question correctly. Previous research has regarded this issue as a problem of the model's robustness to question paraphrase and proposed a retraining method to address it. However, retraining faces challenges in meeting the computational costs and privacy security demands of LLMs. In this paper, we regard this issue as a problem of alignment with model preferences and propose PEARL (Preference-drivEn pAraphRase Learning). This is a black-box method that enhances model performance by paraphrasing questions in expressions preferred by the model. We validate PEARL across six datasets spanning three tasks: open-domain QA, commonsense reasoning, and math word problem. Extensive experiments demonstrated not only the outstanding performance but also the composability, transferability, and immense potential of PEARL, shedding new light on the blackbox tuning of LLMs 1 .

For agents

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

get_harvested_code_for_paper("2024.findings-emnlp.134")
get_code_for_paper("2024.findings-emnlp.134")
have("2024.findings-emnlp.134")

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

curl https://syntology.ai/api/ran/2024.findings-emnlp.134.json

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

[![Syntology run record](https://syntology.ai/api/ran/2024.findings-emnlp.134.svg)](https://syntology.ai/paper/2024.findings-emnlp.134)

Connect an agent — have() is free.