SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.00909 · 2023

Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generation

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 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/2305.00909.json · badge: /api/ran/2305.00909.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
vita-group/chaincoder canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
Embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) · constructed an object; no result was computed
vita-group/chaincoder/model/transformer.py
code served (permissive licence) · get_code("a3e27bd1e8b628ed")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned an instance of its own class, Embedding: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

num_embeddings = 10
embedding_dim = 4
padding_idx = 0

ARGS = {
    'num_embeddings': num_embeddings,
    'embedding_dim': embedding_dim,
    'padding_idx': padding_idx
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Embedding — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Embedding 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
add_wrap Ran
ran on a synthesized input
vita-group/chaincoder/create_data_step1_tokenize_vocab_and_raw.py
code served (permissive licence) · get_code("b6fdb4d96e812300")
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 torch.nn as nn

torch.manual_seed(0)

# Analyzing the function:
# - add_wrap takes a single parameter: 'code' which is a string
# - It splits the code by newlines
# - It wraps the code in a function definition
# - It joins it back together
# - Returns the wrapped code as a string

# The function expects 'code' to be a string containing Python code

ARGS = {
    'code': '''x = 1 + 2
y = x * 3
print(y)'''
}
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 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
getMLP Ran
ran on a synthesized input
vita-group/chaincoder/model/embedders.py
code served (permissive licence) · get_code("9beb5daa445b8484")
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 Sequential. 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

torch.manual_seed(0)

ARGS = {
    'neurons': [10, 20, 15, 5],
    'activation': nn.GELU,
    'bias': True,
    'dropout': 0.2,
    'last_dropout': False,
    'normfun': 'layernorm'
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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_masks Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vita-group/chaincoder/model/transformer.py
code served (permissive licence) · get_code("b2470f4f0c09db41")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple. 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

torch.manual_seed(0)

# Parameters for get_masks function:
# - slen: sequence length (int)
# - lengths: tensor of actual lengths for each sequence in batch
# - causal: boolean flag for causal masking

batch_size = 2
slen = 5

# Create lengths tensor where each element is <= slen
lengths = torch.tensor([3, 5], dtype=torch.long)

# Test with causal=True to exercise both branches
causal = True

ARGS = {
    'slen': slen,
    'lengths': lengths,
    'causal': causal
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
similar Ran
ran, honoured the contract we drafted
vita-group/chaincoder/create_data_step3_raw_to_codeAug.py
code served (permissive licence) · get_code("5e4b02e5bc753357")
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 float, 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.

from difflib import SequenceMatcher

# The similar function takes two arguments (a, b) and compares them using SequenceMatcher
# SequenceMatcher works with any sequence type (strings, lists, etc.)
# We'll use strings as they're the most common use case

a = "hello world"
b = "hello there"

ARGS = {
    "a": a,
    "b": b,
}
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 float, 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
take_atleast_one_second Ran
ran on a synthesized input
vita-group/chaincoder/create_data_step3_raw_to_codeAug.py
code served (permissive licence) · get_code("fa8c18242b863367")
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 function. 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 time

def take_atleast_one_second(func):
    """
    Custom decorator function which makes sure func takes a min of 1 second.
    :param func: Function to be decorated.
    :return: Wrapped fucntion.
    """

    def wrapper(*args, **kwargs):
        tick = time.time()
        val = func(*args, **kwargs)
        while time.time() - tick < 1:
            continue
        return val
    return wrapper


def simple_function():
    """A simple function to be decorated."""
    return 42


ARGS = {
    'func': simple_function
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
top_k_top_p_filtering Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vita-group/chaincoder/model/transformer.py
code served (permissive licence) · get_code("9ef29a7930f6956c")
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 2, dtype family float, shape (2, 4) 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)

# Create a small logits tensor: batch_size=2, vocab_size=4
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits,
    "top_k": 2,
    "top_p": 0.9,
    "filter_value": -float('Inf'),
    "min_tokens_to_keep": 1,
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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_model_tokenizer Not yet run
unverified (harvested, no recorded run)
vita-group/chaincoder/model/embedders.py
code served (permissive licence) · get_code("200d75285c0c6bcc")
How it ran

no invocation recorded.

summarizer Not yet run
unverified (harvested, no recorded run)
vita-group/chaincoder/create_data_step3_raw_to_codeAug.py
code served (permissive licence) · get_code("b63349d788143e3c")
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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 5 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
Embedding 18 other papers
15 dated earlier, 3 later · 3 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1905.12790 (2019-05)
A Generalized Framework of Sequence Generation with Application to Undirected Sequence Models
1911.02116 (2019-11)
Unsupervised Cross-lingual Representation Learning at Scale
and 15 more not named here
get_masks 8 other papers
5 dated earlier, 3 later · 1 only as an assembly brick
1911.02116 (2019-11)
Unsupervised Cross-lingual Representation Learning at Scale
2010.03017 (2020-10)
On Negative Interference in Multilingual Models: Findings and A Meta-Learning Treatment
2110.03501 (2021-10)
Pretrained Language Models are Symbolic Mathematics Solvers too!
and 5 more not named here
similar 6 other papers
1 dated earlier, 5 later
2301.11305 (2023-01)
DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature
2310.05914 (2023-10)
NEFTune: Noisy Embeddings Improve Instruction Finetuning
2404.04269 (2024-04)
Algorithmic Collective Action in Recommender Systems: Promoting Songs by Reordering Playlists
and 3 more not named here
top_k_top_p_filtering 4 other papers
1 dated earlier, 3 later
2104.08066 (2021-04)
Effect of Visual Extensions on Natural Language Understanding in Vision-and-Language Models
2310.05573 (2023-10)
ODEFormer: Symbolic Regression of Dynamical Systems with Transformers
2025.emnlp-main.1418 (2025 (year only))
Synth-SBDH: A Synthetic Dataset of Social and Behavioral Determinants of Health for Clinical Text
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

For a complicated algorithm, its implementation by a human programmer usually starts with outlining a rough control flow followed by iterative enrichments, eventually yielding carefully generated syntactic structures and variables in a hierarchy. However, state-of-the-art large language models generate codes in a single pass, without intermediate warm-ups to reflect the structured thought process of "outline-then-detail". Inspired by the recent success of chain-of-thought prompting, we propose ChainCoder, a program synthesis language model that generates Python code progressively, i.e. from coarse to fine in multiple passes. We first decompose source code into layout frame components and accessory components via abstract syntax tree parsing to construct a hierarchical representation. We then reform our prediction target into a multi-pass objective, each pass generates a subsequence, which is concatenated in the hierarchy. Finally, a tailored transformer architecture is leveraged to jointly encode the natural language descriptions and syntactically aligned I/O data samples. Extensive evaluations show that ChainCoder outperforms state-of-the-arts, demonstrating that our progressive generation eases the reasoning procedure and guides the language model to generate higher-quality solutions. Our codes are available at: https://github.com/VITA-Group/ChainCoder.

For agents

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

get_harvested_code_for_paper("2305.00909")
get_code_for_paper("2305.00909")
have("2305.00909")

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

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

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

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

Connect an agent — have() is free.