SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.12170 · 2023

Language Model Crossover: Variation through Few-Shot Prompting

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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; 0 failures of our instrument; 2 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/2302.12170.json · badge: /api/ran/2302.12170.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
carperai/openelm community (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
FunctionStatusWhere it lives
add Ran
ran, honoured the contract we drafted
carperai/openelm/src/openelm/benchmarks/benchmark_tinygp.py
pointer only (licence: MIT); the stored copy get_code serves, from wz1119/KromHC, is pointer only (licence: NONE) · get_code("1dacda5180fc1b73")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from wz1119/KromHC, 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.

mod Ran
ran on a synthesized input
carperai/openelm/src/openelm/benchmarks/benchmark_tinygp.py
code served (permissive licence) · get_code("5ea7a73b9c803cb8")
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 int, ndim 0, dtype family int, 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

torch.manual_seed(0)

# mod(x, y) performs x % y modulo operation
# Both x and y should be numeric types (int, float, or tensor)

ARGS = {
    "x": 10,
    "y": 3
}
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 int, ndim 0, dtype family int, 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
sample_triton Ran
ran on a synthesized input
carperai/openelm/src/openelm/codegen/codegen_triton.py
code served (permissive licence) · get_code("1c9de8c6a00e3d8f")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def batch_decode(self, tokens):
        # tokens shape: (batch_size, seq_len, ...)
        # Return a list of strings, one per batch element
        batch_size = tokens.shape[0]
        return [f"decoded_text_{i}" for i in range(batch_size)]

# Create a minimal config stand-in
class MinimalConfig:
    def __init__(self):
        self.batch_size = 2
        self.temperature = 0.7
        self.top_p = 0.9
        self.gen_max_length = 10

# Create a minimal code generation model
class MinimalTritonModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def generate(self, input_ids, batch_size, temperature, top_p, gen_max_length):
        # input_ids shape: (batch_size, seq_len)
        # Return shape: (batch_size, input_seq_len + gen_max_length, vocab_size) or similar
        # The function expects tokens[:, input_ids_len:, ...] to work
        batch, seq_len = input_ids.shape
        # Return tokens of shape (batch_size, seq_len + gen_max_length)
        return torch.randint(0, 1000, (batch, seq_len + gen_max_length))

# Construct the arguments
batch = {
    'input_ids': torch.randint(0, 1000, (2, 5))  # batch_size=2, seq_len=5
}

cfg = MinimalConfig()

cg_triton = MinimalTritonModel()

tokenizer = MinimalTokenizer()

add_def = False

ARGS = {
    'batch': batch,
    'cfg': cfg,
    'cg_triton': cg_triton,
    'tokenizer': tokenizer,
    'add_def': add_def
}
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 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_algorithm Not yet run
unverified (harvested, no recorded run)
carperai/openelm/src/openelm/elm.py
code served (permissive licence) · get_code("88f2ab46216e23d3")
How it ran

no invocation recorded.

mul Not yet run
unverified (harvested, no recorded run)
carperai/openelm/src/openelm/benchmarks/benchmark_tinygp.py
code served (permissive licence) · get_code("7bcf15d75988ef3a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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, 1 later) and 4 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
add 2 other papers
2 later · 1 only as an assembly brick
2601.05732 (2026-01)
mHC-lite: You Don't Need 20 Sinkhorn-Knopp Iterations
2601.21579 (2026-01)
KromHC: Manifold-Constrained Hyper-Connections with Kronecker-Product Residual Matrices

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

This paper pursues the insight that language models naturally enable an intelligent variation operator similar in spirit to evolutionary crossover. In particular, language models of sufficient scale demonstrate in-context learning, i.e. they can learn from associations between a small number of input patterns to generate outputs incorporating such associations (also called few-shot prompting). This ability can be leveraged to form a simple but powerful variation operator, i.e. to prompt a language model with a few text-based genotypes (such as code, plain-text sentences, or equations), and to parse its corresponding output as those genotypes' offspring. The promise of such language model crossover (which is simple to implement and can leverage many different open-source language models) is that it enables a simple mechanism to evolve semantically-rich text representations (with few domain-specific tweaks), and naturally benefits from current progress in language models. Experiments in this paper highlight the versatility of language-model crossover, through evolving binary bit-strings, sentences, equations, text-to-image prompts, and Python code. The conclusion is that language model crossover is a promising method for evolving genomes representable as text.

For agents

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

get_harvested_code_for_paper("2302.12170")
get_code_for_paper("2302.12170")
have("2302.12170")

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

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

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

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

Connect an agent — have() is free.