mlsanityData to 7 Oct 2026

Cracks in The Stack: Hidden Vulnerabilities and Licensing Risks in LLM Pre-Training Datasets

arXiv 2501.02628 ↗First posted 5 Jan 2025cs.SE cs.AIcited by 4

Not on the map. Why?

Abstract (arXiv)

A critical part of creating code suggestion systems is the pre-training of Large Language Models on vast amounts of source code and natural language text, often of questionable origin or quality. This may contribute to the presence of bugs and vulnerabilities in code generated by LLMs. While efforts to identify bugs at or after code generation exist, it is preferable to pre-train or fine-tune LLMs on curated, high-quality, and compliant datasets. The need for vast amounts of training data necessitates that such curation be automated, minimizing human intervention. We propose an automated source code autocuration technique that leverages the complete version history of open-source software projects to improve the quality of training data. This approach leverages the version history of all OSS projects to identify training data samples that have been modified or have undergone changes in at least one OSS project, and pinpoint a subset of samples that include fixes for bugs or vulnerabilities. We evaluate this method using The Stack v2 dataset, and find that 17% of the code versions in the dataset have newer versions, with 17% of those representing bug fixes, including 2.36% addressing known CVEs. The deduplicated version of Stack v2 still includes blobs vulnerable to 6,947 known CVEs. Furthermore, 58% of the blobs in the dataset were never modified after creation, suggesting they likely represent software with minimal or no use. Misidentified blob origins present an additional challenge, as they lead to the inclusion of non-permissively licensed code, raising serious compliance concerns. By addressing these issues, the training of new models can avoid perpetuating buggy code patterns or license violations. We expect our results to inspire process improvements for automated data curation, with the potential to enhance the reliability of outputs generated by AI tools.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 15 of its 25 references that are in the map. First posted on arXiv 5 Jan 2025.

Builds on

15 of 25 references.

References · 15

  1. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  2. 2023Textbooks Are All You Needcited by 561
  3. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  4. 2024Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Trainingcited by 478
  5. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  6. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  7. 2023SantaCoder: don't reach for the stars!cited by 169
  8. 2023The BigScience ROOTS Corpus: A 1.6TB Composite Multilingual Datasetcited by 148
  9. 2022Productivity Assessment of Neural Code Completioncited by 97
  10. 2020World of Code: Enabling a Research Workflow for Mining and Analyzing the Universe of Open Source VCS datacited by 7
  11. 2020A Complete Set of Related Git Repositories Identified via Community Detection Approaches Based on Shared Commitscited by 3
  12. 2020A Dataset and an Approach for Identity Resolution of 38 Million Author IDs extracted from 2B Git Commitscited by 3
3 more
  1. 2024Beyond Dependencies: The Role of Copy-Based Reuse in Open Source Software Developmentcited by 3
  2. 2024OSS License Identification at Scale: A Comprehensive Dataset Using World of Codecited by 2
  3. 2023Dataset: Copy-based Reuse in Open Source Softwarecited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 2.

4 papers.