{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/ds-1000-a-natural-and-reliable-benchmark-for","title":"DS-1000: A Natural and Reliable Benchmark for Data Science Code Generation","arxiv_id":"2211.11501","date":"2022-11-18","proceeding":null,"authors":["Yuhang Lai","Chengxi Li","Yiming Wang","Tianyi Zhang","Ruiqi Zhong","Luke Zettlemoyer","Scott Wen-tau Yih","Daniel Fried","Sida Wang","Tao Yu"],"abstract":"We introduce DS-1000, a code generation benchmark with a thousand data science problems spanning seven Python libraries, such as NumPy and Pandas. Compared to prior works, DS-1000 incorporates three core features. First, our problems reflect diverse, realistic, and practical use cases since we collected them from StackOverflow. Second, our automatic evaluation is highly specific (reliable) -- across all Codex-002-predicted solutions that our evaluation accept, only 1.8% of them are incorrect; we achieve this with multi-criteria metrics, checking both functional correctness by running test cases and surface-form constraints by restricting API usages or keywords. Finally, we proactively defend against memorization by slightly modifying our problems to be different from the original StackOverflow source; consequently, models cannot answer them correctly by memorizing the solutions from pre-training. The current best public system (Codex-002) achieves 43.3% accuracy, leaving ample room for improvement. We release our benchmark at https://ds1000-code-gen.github.io.","url_abs":"https://arxiv.org/abs/2211.11501v1","url_pdf":"https://arxiv.org/pdf/2211.11501v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"ds-1000-a-natural-and-reliable-benchmark-for","repo_url":"https://github.com/HKUNLP/DS-1000","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"CC-BY-SA-4.0"}},{"paper_slug":"ds-1000-a-natural-and-reliable-benchmark-for","repo_url":"https://github.com/xlang-ai/ds-1000","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"},{"task_slug":"memorization","task_name":"Memorization"}],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[{"slug":"ds-1000","name":"DS-1000","full_name":""}],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2211.11501","atlas_url":"https://app.syntology.ai/?focus=2211.11501","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.11501"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xlang-ai/ds-1000","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/HKUNLP/DS-1000","reach":{"status":"ok","spdx":"CC-BY-SA-4.0"}}],"summary":{"ran_draft_wrong":2},"by_repo_kind":{"listed":{"samples":2,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":2,"samples":[{"code_sha256_prefix":"d8608c17cac6973c","entry":"edit_to_jsonl","repo":"xlang-ai/ds-1000","repo_kind":"listed","path":"edit_ds1000.py","file_url":"https://github.com/xlang-ai/ds-1000/blob/HEAD/edit_ds1000.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d8608c17cac6973c"}},{"code_sha256_prefix":"419f6710aa5bff88","entry":"postprocess","repo":"xlang-ai/ds-1000","repo_kind":"listed","path":"test_ds1000.py","file_url":"https://github.com/xlang-ai/ds-1000/blob/HEAD/test_ds1000.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"419f6710aa5bff88"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}