SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.15042 · 2024

LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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; 1 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-23; 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/2403.15042.json · badge: /api/ran/2403.15042.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
squeezeailab/llm2llm canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
clean_string Ran
ran; our contract draft was wrong, not the code
squeezeailab/llm2llm/report_results.py
code served (permissive licence) · get_code("9d3687f5a5e31878")
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 torch
import numpy as np

def clean_string(s):
    return ''.join((c for c in s if c.isdigit() or c == '.'))

# The function takes a single parameter 's' which should be a string
# It filters out all characters except digits and '.'
# So we need to provide a string with mixed characters

s = "hello123world456.789test"

ARGS = {
    "s": s
}
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 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
compare_strings Ran
ran, violated the contract we drafted
squeezeailab/llm2llm/GSM8K/filter.py
code served (permissive licence) · get_code("cd21d3a179f7d3eb")
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 bool, 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "s1": "Price: $123.45",
    "s2": "Price: $123.45"
}
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 bool, 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
find_matching_seed Ran
ran; our contract draft was wrong, not the code
squeezeailab/llm2llm/report_results.py
code served (permissive licence) · get_code("209427dd7e7b530b")
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 re

# Construct seed_data with two different formats that the function expects
seed_data = [
    {
        'instruction': 'What is 2 + 2?',
        'output': '4'
    },
    {
        'question': 'What is the capital of France?',
        'answer': 'The capital of France is Paris. #### Paris'
    },
    {
        'instruction': 'Calculate 5 * 3',
        'output': '15'
    }
]

instruction = 'What is 2 + 2?'

ARGS = {
    'seed_data': seed_data,
    'instruction': instruction
}
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
jload Ran
ran; our contract draft was wrong, not the code
squeezeailab/llm2llm/utils.py
code served (permissive licence) · get_code("d07d04439cd1d44f")
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) 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 io
import json
import tempfile
import os

# Create a temporary JSON file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.json")

test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "dict"}
}

with open(temp_file, 'w') as f:
    json.dump(test_data, f)

# Define ARGS with the file path
ARGS = {
    "f": temp_file,
    "mode": "r"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
load_seed_data Ran
ran; our contract draft was wrong, not the code
squeezeailab/llm2llm/report_results.py
code served (permissive licence) · get_code("89feae0b24e905dd")
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 json
import tempfile
import os

# Create a temporary JSON file for testing
temp_json = tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False)
json_data = [
    {"id": 1, "text": "hello world"},
    {"id": 2, "text": "foo bar"}
]
json.dump(json_data, temp_json)
temp_json.close()

# Create a temporary JSONL file for testing
temp_jsonl = tempfile.NamedTemporaryFile(mode='w', suffix='.jsonl', delete=False)
temp_jsonl.write('{"id": 1, "text": "hello"}\n')
temp_jsonl.write('{"id": 2, "text": "world"}\n')
temp_jsonl.close()

ARGS = {
    "seed_data_path": temp_json.name
}
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 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
parallel_execution Ran
ran, honoured the contract we drafted
squeezeailab/llm2llm/GSM8K/generate_data.py
code served (permissive licence) · get_code("74ad488c6999e514")
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. 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 random

torch.manual_seed(0)

def simple_function(input_dict):
    """A simple function that takes a dict and returns a result"""
    x = input_dict.get('x', 0)
    y = input_dict.get('y', 0)
    return x + y

n = 3
inputs = [
    {'x': 1, 'y': 2},
    {'x': 3, 'y': 4},
    {'x': 5, 'y': 6}
]

ARGS = {
    'f': simple_function,
    'n': n,
    'inputs': inputs
}
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 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
post_process_gpt3_response Ran
ran; our contract draft was wrong, not the code
squeezeailab/llm2llm/GSM8K/generate_data.py
code served (permissive licence) · get_code("119edfc3533dd7fc")
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 re
import string

# Construct valid arguments for post_process_gpt3_response

# The function expects:
# 1. num_prompt_instructions: an integer representing the number of prompt instructions
# 2. response: a dict with structure {'message': {'content': str}, 'finish_reason': str}

num_prompt_instructions = 3

# Build a realistic response dict that will pass validation
response = {
    'message': {
        'content': '''Some preamble text.
1. Question: What is the capital of France?
Answer: The capital of France is Paris.
#### Paris

2. Question: What is 2+2?
Answer: Two plus two equals four.
#### 4

3. Question: What is the color of the sky?
Answer: The sky appears blue during the day.
#### Blue'''
    },
    'finish_reason': 'stop'
}

ARGS = {
    'num_prompt_instructions': num_prompt_instructions,
    'response': response
}
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 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
encode_prompt Not yet run
unverified (harvested, no recorded run)
squeezeailab/llm2llm/GSM8K/generate_data.py
code served (permissive licence) · get_code("74a36abacb50f6d4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 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 0 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
jload 46 other papers
22 dated earlier, 21 later, 3 same year, order not determinable
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
2305.12870 (2023-05)
Lion: Adversarial Distillation of Proprietary Large Language Models
2305.13068 (2023-05)
Making Language Models Better Tool Learners with Execution Feedback
and 43 more not named here
clean_string 1 other paper
1 same year, order not determinable
2024.findings-acl.388 (2024 (year only))
LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement
compare_strings 1 other paper
1 same year, order not determinable
2024.findings-acl.388 (2024 (year only))
LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement
encode_prompt 1 other paper
1 same year, order not determinable
2024.findings-acl.388 (2024 (year only))
LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement
find_matching_seed 1 other paper
1 same year, order not determinable
2024.findings-acl.388 (2024 (year only))
LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement
load_seed_data 1 other paper
1 same year, order not determinable
2024.findings-acl.388 (2024 (year only))
LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement
parallel_execution 1 other paper
1 same year, order not determinable
2024.findings-acl.388 (2024 (year only))
LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement
post_process_gpt3_response 1 other paper
1 same year, order not determinable
2024.findings-acl.388 (2024 (year only))
LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement

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

Repositories linked to this paper

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

Abstract

Pretrained large language models (LLMs) are currently state-of-the-art for solving the vast majority of natural language processing tasks. While many real-world applications still require fine-tuning to reach satisfactory levels of performance, many of them are in the low-data regime, making fine-tuning challenging. To address this, we propose LLM2LLM, a targeted and iterative data augmentation strategy that uses a teacher LLM to enhance a small seed dataset by augmenting additional data that can be used for fine-tuning on a specific task. LLM2LLM (1) fine-tunes a baseline student LLM on the initial seed data, (2) evaluates and extracts data points that the model gets wrong, and (3) uses a teacher LLM to generate synthetic data based on these incorrect data points, which are then added back into the training data. This approach amplifies the signal from incorrectly predicted data points by the LLM during training and reintegrates them into the dataset to focus on more challenging examples for the LLM. Our results show that LLM2LLM significantly enhances the performance of LLMs in the low-data regime, outperforming both traditional fine-tuning and other data augmentation baselines. LLM2LLM reduces the dependence on labor-intensive data curation and paves the way for more scalable and performant LLM solutions, allowing us to tackle data-constrained domains and tasks. We achieve improvements up to 24.2% on the GSM8K dataset, 32.6% on CaseHOLD, 32.0% on SNIPS, 52.6% on TREC and 39.8% on SST-2 over regular fine-tuning in the low-data regime using a Llama-2-7B student model. Our code is available at https://github.com/SqueezeAILab/LLM2LLM .

For agents

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

get_harvested_code_for_paper("2403.15042")
get_code_for_paper("2403.15042")
have("2403.15042")

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

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

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

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

Connect an agent — have() is free.