Building Private Repository Benchmarks to Avoid Public Code Contamination

Building Private Repository Benchmarks to Avoid Public Code Contamination

Every public code benchmark published today is a benchmark with a clock on it. The moment a dataset appears on GitHub, Hugging Face, or in a paper's appendix, it enters the pretraining corpus of the next model family. Building private repository benchmarks to avoid public code contamination is not a niche concern for academic labs. It is a prerequisite for any evaluation that needs to measure genuine capability rather than memorisation. This post explains how to design, author, verify, and maintain a private code benchmark that stays clean.

The Direct Answer: What a Private Repository Benchmark Is and Why It Works

A private repository benchmark is a curated set of coding tasks, verifiers, and expected outputs that has never appeared in any publicly indexed source. Because the tasks are not web-derived, a model cannot have memorised them during pretraining. Contamination-resistant benchmarks require three properties: original authorship, programmatic verification, and access control enforced before any model touches the data. Difficulty is calibrated empirically against target model families, not assumed from task description alone.

Why Public Code Benchmarks Saturate So Quickly

Benchmark saturation follows a predictable pattern. A dataset is released, scores rise within one or two model generations, and the community debates whether the improvement reflects capability or contamination. For code benchmarks the timeline is compressed because code is structured, deterministic, and easy to reproduce from partial exposure.

HumanEval, published by OpenAI in 2021, reached near-ceiling performance on leading models within roughly two years of release. MBPP followed a similar curve. The problem is not that these benchmarks were poorly designed. It is that public release is structurally incompatible with long-term signal validity for models trained on internet-scale corpora.

Three contamination vectors are specific to code benchmarks:

  • Direct inclusion: the exact task or its solution appears in pretraining data, scraped from the benchmark repository or a blog post reproducing it.

  • Near-duplicate inclusion: a problem from a competitive programming site or textbook that the benchmark drew from was already in the corpus, even if the benchmark version was reformatted.

  • Solution-first contamination: model has seen a forum thread where the benchmark problem is solved, even if it never saw the benchmark file itself.

Detection methods for each vector differ substantially. For a thorough treatment of n-gram overlap, embedding similarity, and perplexity-based detection, see detecting benchmark contamination with n-gram, embedding, and perplexity methods. The present post focuses on prevention through private authorship, not post-hoc detection.

The Architecture of a Private Code Benchmark

A private code benchmark has four layers. Each layer must be designed before authoring begins, because retrofitting verifiers onto tasks written without them is expensive and often impossible.

Layer 1: Task Authorship Protocol

Tasks must be original compositions, not reformulations of public problems. The authoring protocol enforces this through three requirements:

  1. Source declaration: the author states the domain context and confirms the task does not derive from a named public source. This is a signed attestation, not a checkbox.

  2. Novelty screen: before acceptance, each task is run through a similarity check against known public benchmarks (HumanEval, MBPP, LiveCodeBench, SWE-bench, and the authoring team's own prior tasks). Embedding cosine similarity above a threshold (typically 0.85 against any known public task) triggers review.

  3. Expert review: a second practitioner in the same domain confirms the task is non-trivial and that the canonical solution is correct. For code, this means running the solution against the verifier, not reading it.

The distinction between original-authored and scraped tasks is not cosmetic. It is the entire contamination argument. The contamination gap between original authored and scraped tasks is the structural reason private benchmarks hold signal longer.

Layer 2: Programmatic Verification

A code task without a reliable verifier is not a usable eval signal. Verification for private code benchmarks takes three forms:

  • Unit test suites: deterministic input-output pairs that cover edge cases the task description does not mention. The hidden test count should exceed the visible test count by at least 3:1 to prevent pass-by-pattern.

  • Execution sandboxes: isolated environments (containerised, resource-limited) that run model-generated code without allowing side effects to contaminate subsequent evaluations.

  • Static analysis checks: for tasks where correctness criteria include style, complexity, or language-specific idiom, linters and AST-level checks supplement runtime tests.

Verifier bugs are the most common failure mode in private benchmark programs. A verifier that accepts incorrect solutions silently inflates scores and corrupts the training signal if the benchmark feeds into post-training. Every verifier must itself be tested against known-wrong solutions.

Layer 3: Access Control and Versioning

Private means private throughout the full lifecycle, not just at release. Access control requirements:

  • Tasks stored in a private repository with role-based access. Authors see only their own tasks until review is complete.

  • Solutions and verifiers stored separately from task descriptions, with access restricted to the evaluation harness service account.

  • No model is given batch access to task descriptions. Evaluation runs through an API that logs each query and enforces rate limits to prevent reconstruction attacks.

  • Version tags on every task. If a task is later found to have a public analogue, it is deprecated without affecting the benchmark's other tasks.

Layer 4: Difficulty Calibration

Difficulty is a property of a model family at a point in time, not a property of the task itself. A task that achieves 5% pass@1 against a current frontier model may achieve 60% pass@1 against the next generation. Calibration must be repeated.

The calibration protocol for a private code benchmark:

  1. Run pass@1 and pass@10 against at least two frontier model families at the time of benchmark construction.

  2. Discard tasks where pass@1 exceeds 0.7 across all tested models (too easy) or where pass@10 is 0.0 across all models (likely broken verifier or ambiguous specification).

  3. Re-calibrate against new model versions on a schedule tied to major model releases, not calendar time.

  4. Maintain a difficulty tier taxonomy (for example: L1 = pass@1 0.3-0.7, L2 = 0.1-0.3, L3 = below 0.1) and track tier migration over time.

For a detailed treatment of what sub-10% pass rate benchmarks signal versus noise, see sub-10% pass rate benchmarks: useful signal or noise. The short answer: they are signal when the verifier is reliable and the task is well-specified; they are noise when either condition fails.

Worked Example: A Private Benchmark Task for CNC G-Code Generation

Illustrative example. Numbers and task details are constructed to demonstrate the protocol, not drawn from a live benchmark.

Task description (author-facing): Write a G-code program to mill a rectangular pocket (40mm x 25mm x 8mm deep) in aluminium 6061, using a 10mm flat end mill, 3-flute, at 18,000 RPM. The pocket has a 2mm corner radius. The program must use a helical entry, maintain a 0.5mm axial depth of cut per pass, and finish with a single full-depth contour pass. Output must be valid Fanuc 0i-compatible G-code.

Verifier design: A Python script parses the submitted G-code using a custom tokeniser, then checks: (a) helical entry arc present (G02 or G03 with Z descent), (b) axial step-down does not exceed 0.5mm per Z-level, (c) final contour pass at full depth present, (d) spindle speed within 10% of 18,000 RPM, (e) no rapid moves (G00) inside the pocket boundary. The verifier does not execute the G-code on a machine; it applies geometric and syntactic rules.

Calibration result (illustrative): pass@1 = 0.08, pass@10 = 0.31 against two frontier model families at time of authoring. Tier: L2. The most common failure mode: models generate valid-looking G-code but omit the helical entry, substituting a plunge move that the verifier flags.

This task type is representative of the domain-specific, verifier-grounded approach described in CAD reasoning benchmarks covering sketch constraints and feature trees, extended to manufacturing process output.

Common Failure Modes in Private Benchmark Programs

Private benchmarks fail in predictable ways. Each failure mode is detectable and fixable before it corrupts a training or evaluation run.

1. Verifier accepts plausible-but-wrong solutions. Detection: run known-incorrect solutions through the verifier manually and confirm rejection. Fix: add negative test cases to verifier development as a required step, not an afterthought.

2. Task specification is ambiguous. Detection: two independent experts produce solutions that both pass the verifier but are structurally different in ways that matter for the training objective. Fix: add a disambiguation clause to the task description and add a verifier check for the contested dimension.

3. Authors inadvertently derive tasks from public sources. Detection: post-hoc similarity screen flags a task after authoring. Fix: run the similarity screen before author payment is confirmed, not after. Require source declarations at submission, not at review.

4. Difficulty calibration is performed once and never updated. Detection: benchmark scores on new model versions cluster near ceiling. Fix: build re-calibration into the benchmark governance calendar, triggered by major model releases.

5. Access control is enforced at the file level but not at the evaluation API level. Detection: audit logs show batch queries that could reconstruct task content. Fix: enforce per-task rate limits and log all evaluation queries with model identifier and timestamp.

6. Solutions are stored in the same repository as tasks. Detection: a repository access audit finds that author-level credentials can read both. Fix: separate storage with separate credentials; evaluation harness assembles task-solution pairs at runtime only.

The same contamination-prevention logic applies outside code domains. Expert-authored clinical vignettes with contamination control describes how analogous access and authorship protocols operate in medical evaluation contexts.

Where This Approach Breaks Down

Private repository benchmarks are not a complete solution to evaluation validity. Three limits are worth stating plainly.

First, private benchmarks do not prevent capability transfer from related public tasks. A model trained on public competitive programming data may solve a private task that shares algorithmic structure with public problems, even if the surface form is novel. Novelty of wording is not the same as novelty of required reasoning.

Second, expert authoring throughput is limited. A private benchmark grows at the pace of qualified authors who can write verifiable tasks in the target domain. For niche domains this is a real constraint. Expert task authoring throughput covers the operational trade-offs in more detail.

Third, private benchmarks require ongoing governance. A benchmark that is private at construction but whose tasks leak through model outputs, published papers, or staff departures loses its contamination guarantee retroactively. Governance is a continuous operational cost, not a one-time setup.

Frequently Asked Questions

How is a private repository benchmark different from a holdout set?

A holdout set is data withheld from a training run but potentially derived from the same distribution as public data. A private repository benchmark is authored from scratch, never publicly indexed, and maintained under access control throughout its lifecycle. The contamination guarantee comes from original authorship, not from withholding alone. For more on benchmark design trade-offs, see static, dynamic, private, and holdout benchmark design.

What similarity threshold should trigger a contamination review?

There is no universal threshold. A cosine similarity of 0.85 or above against any known public task using a sentence-level embedding model is a reasonable starting point for code tasks. The threshold should be validated by running known-clean and known-contaminated pairs through the screen and adjusting until the false negative rate is acceptable for the benchmark's intended use.

Can synthetic data substitute for expert-authored private tasks?

Synthetic tasks generated from public code or public problem templates inherit the contamination risk of their source material. Expert-authored tasks written without reference to public sources do not. Synthetic generation can augment a private benchmark by varying surface form around a verified expert-authored core, but it cannot replace the original authorship step that establishes the contamination guarantee.

How often should difficulty calibration be re-run?

Re-calibration should be triggered by major model releases, not by a fixed calendar interval. A benchmark calibrated against models from one generation may be largely saturated by the next without any visible signal degradation in the benchmark's metadata. Tracking pass@1 and pass@10 against new model families at each major release is the minimum viable governance cadence.

What access control standard applies to private benchmark repositories?

There is no benchmark-specific standard, but SOC 2 Type II controls for access management, audit logging, and data segregation are the baseline expectation for vendors and in-house teams handling evaluation data that must not reach model training pipelines. Role-based access, separate credentials for task content and solutions, and query-level logging are the operational minimum.

What This Means in Practice

Building private repository benchmarks to avoid public code contamination is an engineering discipline, not a data-collection task. The contamination guarantee lives in the authorship protocol, the verifier design, the access control architecture, and the recalibration cadence. Any one of these failing silently invalidates the others. Teams that treat private benchmarks as a one-time procurement rather than an ongoing governed system will find their benchmarks saturating on the same timeline as public ones, just with less visibility into why.

The investment is justified because the alternative, relying on public benchmarks whose contamination status is unknown, produces evaluation results that cannot be trusted as capability signals. For post-training decisions, that uncertainty is not acceptable.

If you are building evals or RL environments in code or adjacent engineering domains, get in touch with Chiron Data Labs.

Have questions or want personalised guidance? Contact us and we'll be happy to help.

Every public code benchmark published today is a benchmark with a clock on it. The moment a dataset appears on GitHub, Hugging Face, or in a paper's appendix, it enters the pretraining corpus of the next model family. Building private repository benchmarks to avoid public code contamination is not a niche concern for academic labs. It is a prerequisite for any evaluation that needs to measure genuine capability rather than memorisation. This post explains how to design, author, verify, and maintain a private code benchmark that stays clean.

The Direct Answer: What a Private Repository Benchmark Is and Why It Works

A private repository benchmark is a curated set of coding tasks, verifiers, and expected outputs that has never appeared in any publicly indexed source. Because the tasks are not web-derived, a model cannot have memorised them during pretraining. Contamination-resistant benchmarks require three properties: original authorship, programmatic verification, and access control enforced before any model touches the data. Difficulty is calibrated empirically against target model families, not assumed from task description alone.

Why Public Code Benchmarks Saturate So Quickly

Benchmark saturation follows a predictable pattern. A dataset is released, scores rise within one or two model generations, and the community debates whether the improvement reflects capability or contamination. For code benchmarks the timeline is compressed because code is structured, deterministic, and easy to reproduce from partial exposure.

HumanEval, published by OpenAI in 2021, reached near-ceiling performance on leading models within roughly two years of release. MBPP followed a similar curve. The problem is not that these benchmarks were poorly designed. It is that public release is structurally incompatible with long-term signal validity for models trained on internet-scale corpora.

Three contamination vectors are specific to code benchmarks:

  • Direct inclusion: the exact task or its solution appears in pretraining data, scraped from the benchmark repository or a blog post reproducing it.

  • Near-duplicate inclusion: a problem from a competitive programming site or textbook that the benchmark drew from was already in the corpus, even if the benchmark version was reformatted.

  • Solution-first contamination: model has seen a forum thread where the benchmark problem is solved, even if it never saw the benchmark file itself.

Detection methods for each vector differ substantially. For a thorough treatment of n-gram overlap, embedding similarity, and perplexity-based detection, see detecting benchmark contamination with n-gram, embedding, and perplexity methods. The present post focuses on prevention through private authorship, not post-hoc detection.

The Architecture of a Private Code Benchmark

A private code benchmark has four layers. Each layer must be designed before authoring begins, because retrofitting verifiers onto tasks written without them is expensive and often impossible.

Layer 1: Task Authorship Protocol

Tasks must be original compositions, not reformulations of public problems. The authoring protocol enforces this through three requirements:

  1. Source declaration: the author states the domain context and confirms the task does not derive from a named public source. This is a signed attestation, not a checkbox.

  2. Novelty screen: before acceptance, each task is run through a similarity check against known public benchmarks (HumanEval, MBPP, LiveCodeBench, SWE-bench, and the authoring team's own prior tasks). Embedding cosine similarity above a threshold (typically 0.85 against any known public task) triggers review.

  3. Expert review: a second practitioner in the same domain confirms the task is non-trivial and that the canonical solution is correct. For code, this means running the solution against the verifier, not reading it.

The distinction between original-authored and scraped tasks is not cosmetic. It is the entire contamination argument. The contamination gap between original authored and scraped tasks is the structural reason private benchmarks hold signal longer.

Layer 2: Programmatic Verification

A code task without a reliable verifier is not a usable eval signal. Verification for private code benchmarks takes three forms:

  • Unit test suites: deterministic input-output pairs that cover edge cases the task description does not mention. The hidden test count should exceed the visible test count by at least 3:1 to prevent pass-by-pattern.

  • Execution sandboxes: isolated environments (containerised, resource-limited) that run model-generated code without allowing side effects to contaminate subsequent evaluations.

  • Static analysis checks: for tasks where correctness criteria include style, complexity, or language-specific idiom, linters and AST-level checks supplement runtime tests.

Verifier bugs are the most common failure mode in private benchmark programs. A verifier that accepts incorrect solutions silently inflates scores and corrupts the training signal if the benchmark feeds into post-training. Every verifier must itself be tested against known-wrong solutions.

Layer 3: Access Control and Versioning

Private means private throughout the full lifecycle, not just at release. Access control requirements:

  • Tasks stored in a private repository with role-based access. Authors see only their own tasks until review is complete.

  • Solutions and verifiers stored separately from task descriptions, with access restricted to the evaluation harness service account.

  • No model is given batch access to task descriptions. Evaluation runs through an API that logs each query and enforces rate limits to prevent reconstruction attacks.

  • Version tags on every task. If a task is later found to have a public analogue, it is deprecated without affecting the benchmark's other tasks.

Layer 4: Difficulty Calibration

Difficulty is a property of a model family at a point in time, not a property of the task itself. A task that achieves 5% pass@1 against a current frontier model may achieve 60% pass@1 against the next generation. Calibration must be repeated.

The calibration protocol for a private code benchmark:

  1. Run pass@1 and pass@10 against at least two frontier model families at the time of benchmark construction.

  2. Discard tasks where pass@1 exceeds 0.7 across all tested models (too easy) or where pass@10 is 0.0 across all models (likely broken verifier or ambiguous specification).

  3. Re-calibrate against new model versions on a schedule tied to major model releases, not calendar time.

  4. Maintain a difficulty tier taxonomy (for example: L1 = pass@1 0.3-0.7, L2 = 0.1-0.3, L3 = below 0.1) and track tier migration over time.

For a detailed treatment of what sub-10% pass rate benchmarks signal versus noise, see sub-10% pass rate benchmarks: useful signal or noise. The short answer: they are signal when the verifier is reliable and the task is well-specified; they are noise when either condition fails.

Worked Example: A Private Benchmark Task for CNC G-Code Generation

Illustrative example. Numbers and task details are constructed to demonstrate the protocol, not drawn from a live benchmark.

Task description (author-facing): Write a G-code program to mill a rectangular pocket (40mm x 25mm x 8mm deep) in aluminium 6061, using a 10mm flat end mill, 3-flute, at 18,000 RPM. The pocket has a 2mm corner radius. The program must use a helical entry, maintain a 0.5mm axial depth of cut per pass, and finish with a single full-depth contour pass. Output must be valid Fanuc 0i-compatible G-code.

Verifier design: A Python script parses the submitted G-code using a custom tokeniser, then checks: (a) helical entry arc present (G02 or G03 with Z descent), (b) axial step-down does not exceed 0.5mm per Z-level, (c) final contour pass at full depth present, (d) spindle speed within 10% of 18,000 RPM, (e) no rapid moves (G00) inside the pocket boundary. The verifier does not execute the G-code on a machine; it applies geometric and syntactic rules.

Calibration result (illustrative): pass@1 = 0.08, pass@10 = 0.31 against two frontier model families at time of authoring. Tier: L2. The most common failure mode: models generate valid-looking G-code but omit the helical entry, substituting a plunge move that the verifier flags.

This task type is representative of the domain-specific, verifier-grounded approach described in CAD reasoning benchmarks covering sketch constraints and feature trees, extended to manufacturing process output.

Common Failure Modes in Private Benchmark Programs

Private benchmarks fail in predictable ways. Each failure mode is detectable and fixable before it corrupts a training or evaluation run.

1. Verifier accepts plausible-but-wrong solutions. Detection: run known-incorrect solutions through the verifier manually and confirm rejection. Fix: add negative test cases to verifier development as a required step, not an afterthought.

2. Task specification is ambiguous. Detection: two independent experts produce solutions that both pass the verifier but are structurally different in ways that matter for the training objective. Fix: add a disambiguation clause to the task description and add a verifier check for the contested dimension.

3. Authors inadvertently derive tasks from public sources. Detection: post-hoc similarity screen flags a task after authoring. Fix: run the similarity screen before author payment is confirmed, not after. Require source declarations at submission, not at review.

4. Difficulty calibration is performed once and never updated. Detection: benchmark scores on new model versions cluster near ceiling. Fix: build re-calibration into the benchmark governance calendar, triggered by major model releases.

5. Access control is enforced at the file level but not at the evaluation API level. Detection: audit logs show batch queries that could reconstruct task content. Fix: enforce per-task rate limits and log all evaluation queries with model identifier and timestamp.

6. Solutions are stored in the same repository as tasks. Detection: a repository access audit finds that author-level credentials can read both. Fix: separate storage with separate credentials; evaluation harness assembles task-solution pairs at runtime only.

The same contamination-prevention logic applies outside code domains. Expert-authored clinical vignettes with contamination control describes how analogous access and authorship protocols operate in medical evaluation contexts.

Where This Approach Breaks Down

Private repository benchmarks are not a complete solution to evaluation validity. Three limits are worth stating plainly.

First, private benchmarks do not prevent capability transfer from related public tasks. A model trained on public competitive programming data may solve a private task that shares algorithmic structure with public problems, even if the surface form is novel. Novelty of wording is not the same as novelty of required reasoning.

Second, expert authoring throughput is limited. A private benchmark grows at the pace of qualified authors who can write verifiable tasks in the target domain. For niche domains this is a real constraint. Expert task authoring throughput covers the operational trade-offs in more detail.

Third, private benchmarks require ongoing governance. A benchmark that is private at construction but whose tasks leak through model outputs, published papers, or staff departures loses its contamination guarantee retroactively. Governance is a continuous operational cost, not a one-time setup.

Frequently Asked Questions

How is a private repository benchmark different from a holdout set?

A holdout set is data withheld from a training run but potentially derived from the same distribution as public data. A private repository benchmark is authored from scratch, never publicly indexed, and maintained under access control throughout its lifecycle. The contamination guarantee comes from original authorship, not from withholding alone. For more on benchmark design trade-offs, see static, dynamic, private, and holdout benchmark design.

What similarity threshold should trigger a contamination review?

There is no universal threshold. A cosine similarity of 0.85 or above against any known public task using a sentence-level embedding model is a reasonable starting point for code tasks. The threshold should be validated by running known-clean and known-contaminated pairs through the screen and adjusting until the false negative rate is acceptable for the benchmark's intended use.

Can synthetic data substitute for expert-authored private tasks?

Synthetic tasks generated from public code or public problem templates inherit the contamination risk of their source material. Expert-authored tasks written without reference to public sources do not. Synthetic generation can augment a private benchmark by varying surface form around a verified expert-authored core, but it cannot replace the original authorship step that establishes the contamination guarantee.

How often should difficulty calibration be re-run?

Re-calibration should be triggered by major model releases, not by a fixed calendar interval. A benchmark calibrated against models from one generation may be largely saturated by the next without any visible signal degradation in the benchmark's metadata. Tracking pass@1 and pass@10 against new model families at each major release is the minimum viable governance cadence.

What access control standard applies to private benchmark repositories?

There is no benchmark-specific standard, but SOC 2 Type II controls for access management, audit logging, and data segregation are the baseline expectation for vendors and in-house teams handling evaluation data that must not reach model training pipelines. Role-based access, separate credentials for task content and solutions, and query-level logging are the operational minimum.

What This Means in Practice

Building private repository benchmarks to avoid public code contamination is an engineering discipline, not a data-collection task. The contamination guarantee lives in the authorship protocol, the verifier design, the access control architecture, and the recalibration cadence. Any one of these failing silently invalidates the others. Teams that treat private benchmarks as a one-time procurement rather than an ongoing governed system will find their benchmarks saturating on the same timeline as public ones, just with less visibility into why.

The investment is justified because the alternative, relying on public benchmarks whose contamination status is unknown, produces evaluation results that cannot be trusted as capability signals. For post-training decisions, that uncertainty is not acceptable.

If you are building evals or RL environments in code or adjacent engineering domains, get in touch with Chiron Data Labs.

Have questions or want personalised guidance? Contact us and we'll be happy to help.

© 2026 CHIRON, SAN FRANCISCO, CA