SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.07431 · 2024

Synthetic continued pretraining

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 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/2409.07431.json · badge: /api/ran/2409.07431.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
zitongyang/synthetic_continued_pretraining canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
alleq Ran
ran; our contract draft was wrong, not the code
zitongyang/synthetic_continued_pretraining/utils/python_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Tangkexian/SPA, is pointer only (licence: NONE) · get_code("9a7cf5feb8b5a38e")
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 Tangkexian/SPA, 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.

format_name Ran
ran; our contract draft was wrong, not the code
zitongyang/synthetic_continued_pretraining/utils/prompt_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Tangkexian/SPA, is pointer only (licence: NONE) · get_code("a6ce1f529ec84c5d")
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 Tangkexian/SPA, 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.

jload Ran
ran; our contract draft was wrong, not the code
zitongyang/synthetic_continued_pretraining/utils/io_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
rerank_with_backoff Ran
ran; our contract draft was wrong, not the code
zitongyang/synthetic_continued_pretraining/inference/retry_wrapper.py
code served (permissive licence) · get_code("e48ecbe8e5f76edf")
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 torch
import torch.nn as nn

class MockRerankerClient:
    """Mock client with a rerank method that accepts **kwargs"""
    def rerank(self, **kwargs):
        """Mock rerank method that returns a result"""
        return {
            "results": [
                {"index": 0, "relevance_score": 0.9},
                {"index": 1, "relevance_score": 0.7}
            ]
        }

# Create mock client instance
mock_client = MockRerankerClient()

# Define ARGS dict with all parameters for rerank_with_backoff
ARGS = {
    "client": mock_client,
    "model": "mock-rerank-model",
    "query": "what is machine learning",
    "documents": [
        "Machine learning is a subset of AI",
        "Deep learning uses neural networks"
    ],
    "top_k": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tenacity, torch — 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
round_dict_values Ran
ran; our contract draft was wrong, not the code
zitongyang/synthetic_continued_pretraining/utils/io_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Tangkexian/SPA, is pointer only (licence: NONE) · get_code("6d5f6f5924625234")
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 Tangkexian/SPA, 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.

second_last_character Ran
ran, honoured the contract we drafted
zitongyang/synthetic_continued_pretraining/utils/prompt_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Tangkexian/SPA, is pointer only (licence: NONE) · get_code("3115fb31c4023373")
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 Tangkexian/SPA, 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.

uncapitalize_first Ran
ran; our contract draft was wrong, not the code
zitongyang/synthetic_continued_pretraining/utils/prompt_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Tangkexian/SPA, is pointer only (licence: NONE) · get_code("b96d28b695619968")
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 Tangkexian/SPA, 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.

gptqa Not yet run
unverified (harvested, no recorded run)
zitongyang/synthetic_continued_pretraining/inference/devapi.py
code served (permissive licence) · get_code("8f53b333e679e9b4")
How it ran

no invocation recorded.

jload_list Not yet run
unverified (harvested, no recorded run)
zitongyang/synthetic_continued_pretraining/utils/io_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Tangkexian/SPA, is pointer only (licence: NONE) · get_code("d6d25a00486cb0a3")
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 Tangkexian/SPA, 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. No invocation recorded.

read Not yet run
unverified (harvested, no recorded run)
zitongyang/synthetic_continued_pretraining/utils/python_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Tangkexian/SPA, is pointer only (licence: NONE) · get_code("0cc00af6d58514f4")
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 Tangkexian/SPA, 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. 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, 8 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 8 later) and 2 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
34 dated earlier, 1 the same month, 8 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
alleq 2 other papers
1 dated earlier, 1 later
2406.11280 (2024-06)
ISR-DPO: Aligning Large Multimodal Models for Videos by Iterative Self-Retrospective DPO
2603.22213 (2026-03)
SPA: A Simple but Tough-to-Beat Baseline for Knowledge Injection
jload_list 2 other papers
2 later
2601.05635 (2026-01)
Continual Pretraining on Encrypted Synthetic Data for Privacy-Preserving LLMs
2603.22213 (2026-03)
SPA: A Simple but Tough-to-Beat Baseline for Knowledge Injection
format_name 1 other paper
1 later
2603.22213 (2026-03)
SPA: A Simple but Tough-to-Beat Baseline for Knowledge Injection
read 1 other paper
1 later
2603.22213 (2026-03)
SPA: A Simple but Tough-to-Beat Baseline for Knowledge Injection
round_dict_values 1 other paper
1 later
2603.22213 (2026-03)
SPA: A Simple but Tough-to-Beat Baseline for Knowledge Injection
second_last_character 1 other paper
1 later
2603.22213 (2026-03)
SPA: A Simple but Tough-to-Beat Baseline for Knowledge Injection
uncapitalize_first 1 other paper
1 later
2603.22213 (2026-03)
SPA: A Simple but Tough-to-Beat Baseline for Knowledge Injection

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

Pretraining on large-scale, unstructured internet text enables language models to acquire a significant amount of world knowledge. However, this knowledge acquisition is data-inefficient--to learn a given fact, models must be trained on hundreds to thousands of diverse representations of it. This poses a challenge when adapting a pretrained model to a small corpus of domain-specific documents, where each fact may appear rarely or only once. We propose to bridge this gap with synthetic continued pretraining: using the small domain-specific corpus to synthesize a large corpus more amenable to learning, and then performing continued pretraining on the synthesized corpus. We instantiate this proposal with EntiGraph, a synthetic data augmentation algorithm that extracts salient entities from the source documents and then generates diverse text by drawing connections between the sampled entities. Synthetic continued pretraining with EntiGraph enables a language model to answer questions and follow generic instructions related to the source documents without access to them. If, instead, the source documents are available at inference time, we show that the knowledge acquired through our approach compounds with retrieval-augmented generation. To better understand these results, we build a simple mathematical model of EntiGraph, and show how synthetic data augmentation can "rearrange" knowledge to enable more data-efficient learning.

For agents

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

get_harvested_code_for_paper("2409.07431")
get_code_for_paper("2409.07431")
have("2409.07431")

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

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

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

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

Connect an agent — have() is free.