SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.00828 · 2022

Co-training Improves Prompt-based Learning for Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 3 failures of our instrument; 5 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/2202.00828.json · badge: /api/ran/2202.00828.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
clinicalml/cotrain-prompting canonical (classifier label)
classifier basis not recorded on the link
5 ran · 5 no recorded run
FunctionStatusWhere it lives
fast_walsh_hadamard_torched Ran
ran; our contract draft was wrong, not the code
clinicalml/cotrain-prompting/src/models/intrinsic.py
code served (permissive licence) · get_code("86cd0bb77fbf123f")
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 3, dtype family float, shape (3, 4, 5) 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)

# Create a tensor with shape that works for the function
# The function requires the axis dimension to be a power of 2
# Let's create a tensor of shape (3, 4, 5) where axis=1 has size 4 (which is 2^2)
x = torch.randn(3, 4, 5)

ARGS = {
    "x": x,
    "axis": 1,
    "normalize": True,
}
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 Tensor, ndim 3, dtype family float, shape (3, 4, 5) — shape (3, 4, 5) 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_conf_inds Ran
ran on a synthesized input
clinicalml/cotrain-prompting/src/utils/cotrain_utils.py
code served (permissive licence) · get_code("837d5f20bc5563c5")
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

torch.manual_seed(0)

# Create small tensors for testing
N = 5  # number of samples
feature_dim = 4
num_classes = 3

# Create feature vectors (N x feature_dim)
features = torch.randn(N, feature_dim).numpy()

# Create labels (N,) with values in range [0, num_classes)
labels = torch.randint(0, num_classes, (N,)).numpy()

# Create coverage parameter
coverage = 0.6

# Create device (CPU only)
device = 'cpu'

# Create K parameter
K = 3

# Create scores (optional, None by default)
scores = None

# Create return_scores parameter
return_scores = False

ARGS = {
    'labels': labels,
    'features': features,
    'coverage': coverage,
    'device': device,
    'K': K,
    'scores': scores,
    'return_scores': return_scores,
}
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
get_conf_inds_minppc Ran
ran on a synthesized input
clinicalml/cotrain-prompting/src/utils/cotrain_utils.py
code served (permissive licence) · get_code("94f3895aa6257dfb")
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 synthetic data
N = 8  # number of samples
feature_dim = 4
num_classes = 2

# Create features as numpy array
features = np.random.randn(N, feature_dim).astype(np.float32)

# Create labels as torch tensor with 2 classes
labels = torch.LongTensor([0, 0, 0, 0, 1, 1, 1, 1])

# Coverage and min_ppc parameters
coverage = 0.5  # select 50% of data
min_ppc = 0.3   # minimum per-class proportion

ARGS = {
    'labels': labels,
    'features': features,
    'coverage': coverage,
    'min_ppc': min_ppc,
    'device': 'cpu',
    'K': 3,
    'return_scores': False
}
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 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
modify_with_bitfit Ran
ran; our contract draft was wrong, not the code
clinicalml/cotrain-prompting/src/models/bitfit.py
code served (permissive licence) · get_code("93fee8766c612b43")
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 SimpleTransformer. 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
import re

torch.manual_seed(0)

# Create a simple transformer-like model with named modules and layers
class SimpleTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Module()
        self.encoder.layer1 = nn.Linear(4, 3)
        self.encoder.layer2 = nn.Linear(3, 2)
        self.decoder = nn.Module()
        self.decoder.layer1 = nn.Linear(2, 4)
        
        # Manually register submodules to create the hierarchy
        self.add_module('encoder', self.encoder)
        self.add_module('decoder', self.decoder)
        self.encoder.add_module('layer1', self.encoder.layer1)
        self.encoder.add_module('layer2', self.encoder.layer2)
        self.decoder.add_module('layer1', self.decoder.layer1)

transformer = SimpleTransformer()

# Create a config object with regex patterns
class Config:
    def __init__(self):
        # Pattern to match encoder and decoder modules
        self.bitfit_modules = r"(encoder|decoder)"
        # Pattern to match layer1 and layer2
        self.bitfit_layers = r"layer[12]"

config = Config()

ARGS = {
    "transformer": transformer,
    "config": config
}
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 SimpleTransformer — a SimpleTransformer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleTransformer 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
modify_with_lora Ran
ran; our contract draft was wrong, not the code
clinicalml/cotrain-prompting/src/models/lora.py
code served (permissive licence) · get_code("ceef2f830a0ed0cd")
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 SimpleTransformer. 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
import re

torch.manual_seed(0)

# Create a simple config class with the required attributes
class Config:
    def __init__(self):
        self.lora_modules = "transformer.layer.*"
        self.lora_layers = "linear"
        self.lora_rank = 2
        self.lora_scaling_rank = 1
        self.lora_init_scale = 0.01

# Create a simple transformer-like model with Linear layers
class SimpleTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        self.transformer = nn.Module()
        
        # Create layer submodules
        layer0 = nn.Module()
        layer0.linear = nn.Linear(4, 3)
        self.transformer.layer0 = layer0
        
        layer1 = nn.Module()
        layer1.linear = nn.Linear(4, 3)
        self.transformer.layer1 = layer1

# Instantiate the transformer and config
transformer = SimpleTransformer()
config = Config()

ARGS = {
    'transformer': transformer,
    'config': config
}
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 SimpleTransformer — a SimpleTransformer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleTransformer 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
fastfood_vars Not yet run
unverified (harvested, no recorded run)
clinicalml/cotrain-prompting/src/models/intrinsic.py
code served (permissive licence) · get_code("1e24166d952ce221")
How it ran

no invocation recorded.

get_adapter Not yet run
unverified (harvested, no recorded run)
clinicalml/cotrain-prompting/src/models/adapters.py
code served (permissive licence) · get_code("8437c16cba343b4d")
How it ran

no invocation recorded.

get_conf_inds_per_class Not yet run
unverified (harvested, no recorded run)
clinicalml/cotrain-prompting/src/utils/cotrain_utils.py
code served (permissive licence) · get_code("73fb194c40a4254a")
How it ran

no invocation recorded.

modify_with_adapters Not yet run
unverified (harvested, no recorded run)
clinicalml/cotrain-prompting/src/models/adapters.py
code served (permissive licence) · get_code("e76a3ca72fd3d2d5")
How it ran

no invocation recorded.

random_vars Not yet run
unverified (harvested, no recorded run)
clinicalml/cotrain-prompting/src/models/intrinsic.py
code served (permissive licence) · get_code("ff477f580a9ac93f")
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, 7 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 7 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
fast_walsh_hadamard_torched 1 other paper
1 later
2310.14198 (2023-10)
QA-NatVer: Question Answering for Natural Logic-based Fact Verification
fastfood_vars 1 other paper
1 later
2310.14198 (2023-10)
QA-NatVer: Question Answering for Natural Logic-based Fact Verification
get_adapter 1 other paper
1 later
2310.14198 (2023-10)
QA-NatVer: Question Answering for Natural Logic-based Fact Verification
modify_with_adapters 1 other paper
1 later
2310.14198 (2023-10)
QA-NatVer: Question Answering for Natural Logic-based Fact Verification
modify_with_bitfit 1 other paper
1 later
2310.14198 (2023-10)
QA-NatVer: Question Answering for Natural Logic-based Fact Verification
modify_with_lora 1 other paper
1 later
2310.14198 (2023-10)
QA-NatVer: Question Answering for Natural Logic-based Fact Verification
random_vars 1 other paper
1 later
2310.14198 (2023-10)
QA-NatVer: Question Answering for Natural Logic-based Fact Verification

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

We demonstrate that co-training (Blum & Mitchell, 1998) can improve the performance of prompt-based learning by using unlabeled data. While prompting has emerged as a promising paradigm for few-shot and zero-shot learning, it is often brittle and requires much larger models compared to the standard supervised setup. We find that co-training makes it possible to improve the original prompt model and at the same time learn a smaller, downstream task-specific model. In the case where we only have partial access to a prompt model (e.g., output probabilities from GPT-3 (Brown et al., 2020)) we learn a calibration model over the prompt outputs. When we have full access to the prompt model's gradients but full finetuning remains prohibitively expensive (e.g., T0 (Sanh et al., 2021)), we learn a set of soft prompt continuous vectors to iteratively update the prompt model. We find that models trained in this manner can significantly improve performance on challenging datasets where there is currently a large gap between prompt-based learning and fully-supervised models.

For agents

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

get_harvested_code_for_paper("2202.00828")
get_code_for_paper("2202.00828")
have("2202.00828")

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

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

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

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

Connect an agent — have() is free.