mlsanityData to 7 Oct 2026

Trained Without My Consent: Detecting Code Inclusion In Language Models Trained on Code

arXiv 2402.09299 ↗First posted 14 Feb 2024cs.SE cs.LGcited by 8

Not on the map. Why?

Abstract (arXiv)

Code auditing ensures that the developed code adheres to standards, regulations, and copyright protection by verifying that it does not contain code from protected sources. The recent advent of Large Language Models (LLMs) as coding assistants in the software development process poses new challenges for code auditing. The dataset for training these models is mainly collected from publicly available sources. This raises the issue of intellectual property infringement as developers' codes are already included in the dataset. Therefore, auditing code developed using LLMs is challenging, as it is difficult to reliably assert if an LLM used during development has been trained on specific copyrighted codes, given that we do not have access to the training datasets of these models. Given the non-disclosure of the training datasets, traditional approaches such as code clone detection are insufficient for asserting copyright infringement. To address this challenge, we propose a new approach, TraWiC; a model-agnostic and interpretable method based on membership inference for detecting code inclusion in an LLM's training dataset. We extract syntactic and semantic identifiers unique to each program to train a classifier for detecting code inclusion. In our experiments, we observe that TraWiC is capable of detecting 83.87% of codes that were used to train an LLM. In comparison, the prevalent clone detection tool NiCad is only capable of detecting 47.64%. In addition to its remarkable performance, TraWiC has low resource overhead in contrast to pair-wise clone detection that is conducted during the auditing process of tools like CodeWhisperer reference tracker, across thousands of code snippets.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 38 of its 89 references that are in the map. First posted on arXiv 14 Feb 2024.

Builds on

38 of 89 references.

References · 38

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2021Program Synthesis with Large Language Modelscited by 3,509
  6. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
  7. 2023Mistral 7Bcited by 3,065
  8. 2018Deep contextualized word representationscited by 2,285
  9. 2016Membership Inference Attacks against Machine Learning Modelscited by 2,221
  10. 2020Extracting Training Data from Large Language Modelscited by 2,144
  11. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  12. 2019Language Models as Knowledge Bases?cited by 1,922
26 more
  1. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
  2. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
  3. 2018Exploiting Unintended Feature Leakage in Collaborative Learningcited by 509
  4. 2020Pre-trained Models for Natural Language Processing: A Surveycited by 504
  5. 2018ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Modelscited by 475
  6. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  7. 2021Membership Inference Attacks on Machine Learning: A Surveycited by 306
  8. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  9. 2022Memorization Without Overfitting: Analyzing the Training Dynamics of Large Language Modelscited by 218
  10. 2019Commonsense Knowledge Mining from Pretrained Modelscited by 189
  11. 2019MemGuard: Defending against Black-Box Membership Inference Attacks via Adversarial Examplescited by 183
  12. 2023SantaCoder: don't reach for the stars!cited by 169
  13. 2019Stolen Memories: Leveraging Model Memorization for Calibrated White-Box Membership Inferencecited by 168
  14. 2021Counterfactual Memorization in Neural Language Modelscited by 155
  15. 2023Speak, Memory: An Archaeology of Books Known to ChatGPT/GPT-4cited by 123
  16. 2018Understanding Membership Inferences on Well-Generalized Learning Modelscited by 83
  17. 2021Node-Level Membership Inference Attacks Against Graph Neural Networkscited by 80
  18. 2021Practical Blind Membership Inference Attack via Differential Comparisonscited by 73
  19. 2015SourcererCC: Scaling Code Clone Detection to Big Codecited by 40
  20. 2020Differentially Private Synthetic Data: Applied Evaluations and Enhancementscited by 36
  21. 2023Tools for Verifying Neural Models' Training Datacited by 21
  22. 2022To What Extent do Deep Learning-based Code Recommenders Generate Predictions by Cloning Code from the Training Set?cited by 11
  23. 2023Gotcha! This Model Uses My Code! Evaluating Membership Leakage Risks in Code Modelscited by 11
  24. 2013Double Ramp Loss Based Reject Option Classifiercited by 9
  25. 2021How Developers Choose Namescited by 3
  26. 2023Khaos: The Impact of Inter-procedural Code Obfuscation on Binary Diffing Techniquescited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 5; 2026: 1.

8 papers.