Git History Is a Pangenome: Repetition in Code Training Corpora and What Deduplication Removes, Keeps and Misses
Not on the map. Why?
Abstract (arXiv)
Code models are increasingly trained on the full history of software repositories, every version of every file, rather than on a single snapshot. The tools that deduplicate training data were built for snapshots, and what they do to a history has not been measured. We measured it on a pre-registered random sample of 306 public repositories, 25 mature projects, and the 12 repositories behind the SWE-bench benchmark. A history is mostly repetition: in the vocabulary of text indexing, a pangenome, one text in many near-identical variants. The history of a typical repository holds the equivalent of 19 copies of its current code, and a mature repository holds 89. The reason is that each edit changes a few lines and leaves the rest of the file in place: nine tokens in ten of a changed file already existed before the change. Exact-match deduplication removes none of these copies, since no two versions are identical. Large training pipelines already deduplicate their snapshots by grouping near-identical files and keeping one. Applied across versions, the same step brings the repetition down to about two copies. But two problems remain. The deduplicator keeps one version of each file, and in widely used implementations, including the one we measured, the rule for choosing that version ignores dates, so for half of all files the version kept for training is an old one. Sorting versions newest first before deduplicating fixes the problem at almost no cost. The second problem is benchmark answers. Benchmarks such as SWE-bench test a model on real bug fixes, and a merged fix survives in a median of 18 later versions of the files it changed. Therefore, removing benchmark fixes needs a separate step that checks every version. We turn the measurements into a short set of rules for teams that train on code history, and release the instruments and frozen outputs.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 30 of its 45 references that are in the map. Submitted 20 Nov 2026, announced 23 Nov 2026.
Builds on
30 of 45 references.
References · 30
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,241
- 2023StarCoder: may the source be with you!cited by 851
- 2022Quantifying Memorization Across Neural Language Modelscited by 810
- 2021Deduplicating Training Data Makes Language Models Bettercited by 762
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 544
- 2023Scaling Data-Constrained Language Modelscited by 443
- 2024Training Software Engineering Agents and Verifiers with SWE-Gymcited by 414
- 2022The Stack: 3 TB of permissively licensed source codecited by 380
- 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 371
- 2023SemDeDup: Data-efficient learning at web-scale through semantic deduplicationcited by 334
- 2022Deduplicating Training Data Mitigates Privacy Risks in Language Modelscited by 327
18 more
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 203
- 2025R2E-Gym: Procedural Environments and Hybrid Verifiers for Scaling Open-Weights SWE Agentscited by 193
- 2025SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agentscited by 183
- 2023SantaCoder: don't reach for the stars!cited by 180
- 2022Scaling Laws and Interpretability of Learning from Repeated Datacited by 167
- 2023D4: Improving LLM Pretraining via Document De-Duplication and Diversificationcited by 157
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 148
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 131
- 2024SWE-Bench+: Enhanced Coding Benchmark for LLMscited by 119
- 2025The SWE-Bench Illusion: When State-of-the-Art LLMs Remember Instead of Reasoncited by 64
- 2025Seed-Coder: Let the Code Model Curate Data for Itselfcited by 59
- 2021Sampling Projects in GitHub for MSR Studiescited by 24
- 2023From Commit Message Generation to History-Aware Commit Message Completioncited by 18
- 2024CommitBench: A Benchmark for Commit Message Generationcited by 9
- 2020World of Code: Enabling a Research Workflow for Mining and Analyzing the Universe of Open Source VCS datacited by 8
- 2025Cracks in The Stack: Hidden Vulnerabilities and Licensing Risks in LLM Pre-Training Datasetscited by 6
- 2026Internal Data Repetition Destroys Language Modelscited by 5
- 2023The Software Heritage Open Science Ecosystemcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2023RepoFusion: Training Code Models to Understand Your Repository
- 2026When Retrieval Hurts Code Completion: A Diagnostic Study of Stale Repository Context
- 2026Temporal Validity on Real Software Histories: Eliminating Stale-Fact Errors in Code-Assistant Memory over GitHub Fixes
- 2026Stratum: Repository Memory for Coding Agents Beyond the Context Window
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation
- 2026CommitDistill: A Lightweight Knowledge-Centric Memory Layer for Software Repositories
- 2026Impact Is Not Invalidation: Ask About the Claim, Not the Diff
- 2024On The Importance of Reasoning for Context Retrieval in Repository-Level Code Editing