mlsanityData to 7 Oct 2026

An Exploratory Investigation into Code License Infringements in Large Language Model Training Datasets

arXiv 2403.15230 ↗First posted 22 Mar 2024cs.SE cs.LGcited by 8

Not on the map. Why?

Abstract (arXiv)

Does the training of large language models potentially infringe upon code licenses? Furthermore, are there any datasets available that can be safely used for training these models without violating such licenses? In our study, we assess the current trends in the field and the importance of incorporating code into the training of large language models. Additionally, we examine publicly available datasets to see whether these models can be trained on them without the risk of legal issues in the future. To accomplish this, we compiled a list of 53 large language models trained on file-level code. We then extracted their datasets and analyzed how much they overlap with a dataset we created, consisting exclusively of strong copyleft code. Our analysis revealed that every dataset we examined contained license inconsistencies, despite being selected based on their associated repository licenses. We analyzed a total of 514 million code files, discovering 38 million exact duplicates present in our strong copyleft dataset. Additionally, we examined 171 million file-leading comments, identifying 16 million with strong copyleft licenses and another 11 million comments that discouraged copying without explicitly mentioning a license. Based on the findings of our study, which highlights the pervasive issue of license inconsistencies in large language models trained on code, our recommendation for both researchers and the community is to prioritize the development and adoption of best practices for dataset creation and management.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 18 of its 40 references that are in the map. First posted on arXiv 22 Mar 2024.

Builds on

18 of 40 references.

References · 18

  1. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,694
  2. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  3. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  4. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  5. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  6. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  7. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  8. 2021Membership Inference Attacks on Machine Learning: A Surveycited by 306
  9. 2023Software Testing with Large Language Models: Survey, Landscape, and Visioncited by 163
  10. 2022Large Language Models Meet NL2Code: A Surveycited by 135
  11. 2022Preventing Verbatim Memorization in Language Models Gives a False Sense of Privacycited by 97
  12. 2023At Which Training Stage Does Code Data Help LLMs Reasoning?cited by 82
6 more
  1. 2023DEPN: Detecting and Editing Privacy Neurons in Pretrained Language Modelscited by 75
  2. 2023A Bibliometric Review of Large Language Models Research from 2017 to 2023cited by 56
  3. 2023Traces of Memorisation in Large Language Models for Codecited by 26
  4. 2023Gotcha! This Model Uses My Code! Evaluating Membership Leakage Risks in Code Modelscited by 11
  5. 2023The (ab)use of Open Source Code to Train Large Language Modelscited by 9
  6. 2023Targeted Attack on GPT-Neo for the SATML Language Model Data Extraction Challengecited by 7

Built on by

Cited by year (2026 to 7 Oct)

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

8 papers.