SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2211.03044 · ICML · 2023

Tuning Language Models as Training Data Generators for Augmentation-Enhanced Few-Shot Learning

Jiawei Han, Yu Zhang, Yu Meng, Jiaxin Huang, Tarek Abdelzaher, Martin Michalski, Autoregressive Plm

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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, 0 violated it and 2 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/2211.03044.json · badge: /api/ran/2211.03044.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
yumeng5/fewgen canonical (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
combine Ran
ran on a synthesized input
yumeng5/fewgen/utils/gen_utils.py
code served (permissive licence) · get_code("8b405662894bddba")
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
from collections import defaultdict

# Create temporary JSON files with sample data
temp_dir = tempfile.mkdtemp()

# Create first data file
data_file_1 = os.path.join(temp_dir, 'data1.json')
data_1 = [
    {'label': 'A', 'value': 1},
    {'label': 'B', 'value': 2},
    {'label': 'A', 'value': 3},
]
with open(data_file_1, 'w') as f:
    json.dump(data_1, f)

# Create second data file
data_file_2 = os.path.join(temp_dir, 'data2.json')
data_2 = [
    {'label': 'B', 'value': 4},
    {'label': 'C', 'value': 5},
]
with open(data_file_2, 'w') as f:
    json.dump(data_2, f)

# Create third data file (shorter)
data_file_3 = os.path.join(temp_dir, 'data3.json')
data_3 = [
    {'label': 'C', 'value': 6},
]
with open(data_file_3, 'w') as f:
    json.dump(data_3, f)

# Define arguments for the combine function
gen_file_dict = {
    'label1': data_file_1,
    'label2': data_file_2,
    'label3': data_file_3,
}

ARGS = {
    'gen_file_dict': gen_file_dict,
    'k': None,
}
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
default_dev_objective Ran
ran, honoured the contract we drafted
yumeng5/fewgen/src/classification_trainer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from uijeongjang/lora-ntk, is pointer only (licence: NONE) · get_code("e448786d5ff1875a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from uijeongjang/lora-ntk, and GitHub detected no licence in that repository 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.

get_label Ran
ran; our contract draft was wrong, not the code
yumeng5/fewgen/utils/gen_k_shot.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from alrope123/prompt-waywardness, is pointer only (licence: NONE) · get_code("126ae8eeb63d59bf")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from alrope123/prompt-waywardness, and GitHub detected no licence in that repository 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.

input_example_to_string Ran
ran; our contract draft was wrong, not the code
yumeng5/fewgen/src/dataset.py
code served (permissive licence) · get_code("e768e25ca95f70cd")
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.

class Example:
    def __init__(self, text_a, text_b=None):
        self.text_a = text_a
        self.text_b = text_b

example_with_text_b = Example("Hello world", "This is text b")
example_without_text_b = Example("Hello world", None)

ARGS = {
    "example": example_with_text_b,
    "sep_token": "[SEP]"
}
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
input_example_to_tuple Ran
ran; our contract draft was wrong, not the code
yumeng5/fewgen/src/dataset.py
code served (permissive licence) · get_code("fbef70dc7c700501")
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 logging
import pandas as pd

logger = logging.getLogger(__name__)

# Create a simple example class that mimics the structure needed
class Example:
    def __init__(self, text_a, text_b=None):
        self.text_a = text_a
        self.text_b = text_b

# Test case 1: example with both text_a and text_b
example_both = Example(text_a="Hello world", text_b="Goodbye world")

# Test case 2: example with only text_a
example_single = Example(text_a="Hello world", text_b=None)

# Test case 3: example with None text_a and None text_b
example_empty = Example(text_a=None, text_b=None)

# Use the most complete example for the ARGS dict
ARGS = {
    "example": example_both
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
load_datasets Ran
ran; our contract draft was wrong, not the code
yumeng5/fewgen/utils/gen_k_shot.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from uijeongjang/lora-ntk, is pointer only (licence: NONE) · get_code("8e27652a29c8adcc")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from uijeongjang/lora-ntk, and GitHub detected no licence in that repository 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.

read_files Ran
ran on a synthesized input
yumeng5/fewgen/utils/gen_utils.py
code served (permissive licence) · get_code("0d9c73d656213f02")
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 os
import tempfile
import json

# Create a temporary directory with mock JSON files for testing
temp_dir = tempfile.mkdtemp()

# Create mock JSON files for the 'mnli' task
task = 'mnli'
labels = ['entailment', 'neutral', 'contradiction']

for label in labels:
    filename = f'{task}_{label}.json'
    filepath = os.path.join(temp_dir, filename)
    with open(filepath, 'w') as f:
        json.dump({'data': 'mock'}, f)

read_dir = temp_dir

ARGS = {
    'read_dir': read_dir,
    'task': task
}
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 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
split_header Ran
ran; our contract draft was wrong, not the code
yumeng5/fewgen/utils/gen_k_shot.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from alrope123/prompt-waywardness, is pointer only (licence: NONE) · get_code("efd1b7718b950470")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from alrope123/prompt-waywardness, and GitHub detected no licence in that repository 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.

tokenize_multipart_input_classification Not yet run
unverified (harvested, no recorded run)
yumeng5/fewgen/src/dataset.py
code served (permissive licence) · get_code("7d99ecf76c902dc4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 6 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
input_example_to_string 9 other papers
5 dated earlier, 4 later
2110.01256 (2021-10)
Revisiting Self-Training for Few-Shot Learning of Language Model
2110.06274 (2021-10)
LiST: Lite Prompted Self-training Makes Parameter-Efficient Few-shot Learners
2202.11451 (2022-02)
Zero-shot Cross-lingual Transfer of Prompt-based Tuning with a Unified Multilingual Prompt
and 6 more not named here
input_example_to_tuple 9 other papers
5 dated earlier, 4 later
2110.01256 (2021-10)
Revisiting Self-Training for Few-Shot Learning of Language Model
2110.06274 (2021-10)
LiST: Lite Prompted Self-training Makes Parameter-Efficient Few-shot Learners
2202.11451 (2022-02)
Zero-shot Cross-lingual Transfer of Prompt-based Tuning with a Unified Multilingual Prompt
and 6 more not named here
default_dev_objective 7 other papers
5 dated earlier, 2 later
2110.01256 (2021-10)
Revisiting Self-Training for Few-Shot Learning of Language Model
2110.06274 (2021-10)
LiST: Lite Prompted Self-training Makes Parameter-Efficient Few-shot Learners
2202.11451 (2022-02)
Zero-shot Cross-lingual Transfer of Prompt-based Tuning with a Unified Multilingual Prompt
and 4 more not named here
split_header 7 other papers
2 dated earlier, 5 later
2108.04106 (2021-08)
Noisy Channel Language Model Prompting for Few-Shot Text Classification
2112.08348 (2021-12)
Prompt Waywardness: The Curious Case of Discretized Interpretation of Continuous Prompts
2212.09257 (2022-12)
PromptBoosting: Black-Box Text Classification with Ten Forward Passes
and 4 more not named here
get_label 5 other papers
2 dated earlier, 3 later
2108.04106 (2021-08)
Noisy Channel Language Model Prompting for Few-Shot Text Classification
2112.08348 (2021-12)
Prompt Waywardness: The Curious Case of Discretized Interpretation of Continuous Prompts
2305.01711 (2023-05)
Don't Stop Pretraining? Make Prompt-based Fine-tuning Powerful Learner
and 2 more not named here
load_datasets 4 other papers
1 dated earlier, 3 later
2108.04106 (2021-08)
Noisy Channel Language Model Prompting for Few-Shot Text Classification
2305.01711 (2023-05)
Don't Stop Pretraining? Make Prompt-based Fine-tuning Powerful Learner
2309.05173 (2023-09)
DePT: Decomposed Prompt Tuning for Parameter-Efficient Fine-tuning
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

Recent studies have revealed the intriguing fewshot learning ability of pretrained language models (PLMs): They can quickly adapt to a new task when fine-tuned on a small amount of labeled data formulated as prompts, without requiring abundant task-specific annotations. Despite their promising performance, most existing few-shot approaches that only learn from the small training set still underperform fully supervised training by nontrivial margins. In this work, we study few-shot learning with PLMs from a different perspective: We first tune an autoregressive PLM on the few-shot samples and then use it as a generator to synthesize a large amount of novel training samples which augment the original training set. To encourage the generator to produce labeldiscriminative samples, we train it via weighted maximum likelihood where the weight of each token is automatically adjusted based on a discriminative meta-learning objective. A classification PLM can then be fine-tuned on both the few-shot and the synthetic samples with regularization for better generalization and stability. Our approach FewGen achieves an overall better result across seven classification tasks of the GLUE benchmark than existing few-shot learning methods, improving no-augmentation methods by 5+ average points, and outperforming augmentation methods by 3+ average points.

For agents

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

get_harvested_code_for_paper("2211.03044")
get_code_for_paper("2211.03044")
have("2211.03044")

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

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

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

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

Connect an agent — have() is free.