﻿# ResearchCodeBench: paper-to-code completion needs a fixed test contract and score version

The final benchmark evaluates masked research-code snippets; its HARD subset, unweighted pass rate and contamination analysis differ from early project summaries.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/researchcodebench-hard-snippet-tests-version-weighting-exposure-boundary/
Language: en

Implementing a method from a research paper requires more than generating a familiar utility function. [ResearchCodeBench's final NeurIPS paper](https://papers.nips.cc/paper_files/paper/2025/file/cd0d0a873cc3e601c76f46dccc3d4c5f-Paper-Datasets_and_Benchmarks_Track.pdf) tests that ability by removing selected implementation snippets and asking a model to restore them using the paper and surrounding code. The result is concrete executable evidence, but its scope is narrower than independently reproducing an entire scientific study.

## What a task gives the model

The benchmark contains 212 challenges from 20 machine-learning papers. Each task provides a masked region, relevant repository context and paper information. Generated code is inserted back into the corresponding implementation and checked using curated tests.

The final paper combines reference-equivalence testing with complementary unit tests. It discusses gradients, threshold behavior, stochasticity and state transitions as cases where merely matching one output can be insufficient. Passing remains evidence under those tests, rather than proof for every possible input or a full training run. The guide to [HumanEval execution contracts](/journal/data-guide-humaneval-entrypoint-tests/) explains the same boundary for a different coding task.

## HARD is a selected task population

ResearchCodeBench-HARD contains 109 tasks selected for low aggregate success among the evaluated models. It is a difficulty-selected subset, rather than a separate randomly sampled future research collection. That selection belongs with any headline result and should remain fixed when comparing a later checkpoint.

The final paper evaluates 32 models and reports 33.0% as the best first-attempt result on HARD in its historical comparison. This is not a current leaderboard claim. It also is not the fraction of complete research papers successfully replicated: the denominator is selected code snippets, under the provided context and test protocol.

## Score weighting changed between presentations

The final paper defines first-attempt passing under greedy decoding and prioritizes task-based results, while retaining a code-length-weighted measure in its appendix. The early project site and initial preprint emphasize weighted results. Those numbers answer different aggregation questions and cannot be silently placed in one ranking.

Code length can give a long snippet more influence than a short but conceptually difficult contribution. Unweighted task passing avoids that particular effect, while still depending on how contributions are divided into tasks. A useful report preserves the publication version, task identifiers, weighting and generation settings alongside the scores.

## Contamination and execution limits remain

The authors compare repository commit dates with reported model cutoffs and identify a 13-paper subset intended to reduce prior-exposure risk. This temporal subset is a different selection from HARD. Dates and reported cutoffs provide evidence of reduced exposure, not a guarantee that a method or related code never appeared elsewhere. [LiveCodeBench time-window guidance](/journal/data-guide-livecodebench-time-window/) describes that qualification in detail.

The actual [author repository](https://github.com/PatrickHua/ResearchCodeBench) documents environment checks and a provider-backed evaluation workflow. Its CPU-host example does not establish that every evaluated model can run locally without an accelerator. No generated code or benchmark was executed for this article. For a before-and-after model comparison, retain identical paper context, masked code, dependencies and tests; otherwise an environment or aggregation change can masquerade as an improvement in implementing research ideas.
