LiCoEval: Evaluating LLMs on License Compliance in Code Generation
Not on the map. Why?
Abstract (arXiv)
Recent advances in Large Language Models (LLMs) have revolutionized code generation, leading to widespread adoption of AI coding tools by developers. However, LLMs can generate license-protected code without providing the necessary license information, leading to potential intellectual property violations during software production. This paper addresses the critical, yet underexplored, issue of license compliance in LLM-generated code by establishing a benchmark to evaluate the ability of LLMs to provide accurate license information for their generated code. To establish this benchmark, we conduct an empirical study to identify a reasonable standard for "striking similarity" that excludes the possibility of independent creation, indicating a copy relationship between the LLM output and certain open-source code. Based on this standard, we propose LiCoEval, to evaluate the license compliance capabilities of LLMs, i.e., the ability to provide accurate license or copyright information when they generate code with striking similarity to already existing copyrighted code. Using LiCoEval, we evaluate 14 popular LLMs, finding that even top-performing LLMs produce a non-negligible proportion (0.88% to 2.01%) of code strikingly similar to existing open-source implementations. Notably, most LLMs fail to provide accurate license information, particularly for code under copyleft licenses. These findings underscore the urgent need to enhance LLM compliance capabilities in code generation tasks. Our study provides a foundation for future research and development to improve license compliance in AI-assisted software development, contributing to both the protection of open-source software copyrights and the mitigation of legal risks for LLM users.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 41 of its 87 references that are in the map. First posted on arXiv 5 Aug 2024.
Builds on
41 of 87 references.
References · 41
- 2023GPT-4 Technical Reportcited by 18,132
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Toolscited by 1,096
- 2023StarCoder: may the source be with you!cited by 790
- 2022Quantifying Memorization Across Neural Language Modelscited by 755
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2021Deduplicating Training Data Makes Language Models Bettercited by 705
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
29 more
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 325
- 2022Do Users Write More Insecure Code with AI Assistants?cited by 186
- 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 166
- 2021Counterfactual Memorization in Neural Language Modelscited by 155
- 2024CodeGemma: Open Code Models Based on Gemmacited by 145
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2024Generalization or Memorization: Data Contamination and Trustworthy Evaluation for Large Language Modelscited by 119
- 2023InferFix: End-to-End Program Repair with LLMscited by 113
- 2023Foundation Models and Fair Usecited by 112
- 2023Copyright Violations and Large Language Modelscited by 108
- 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
- 2022Natural Attack for Pre-trained Models of Codecited by 72
- 2024RepoAgent: An LLM-Powered Open-Source Framework for Repository-level Code Documentation Generationcited by 69
- 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repaircited by 55
- 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequencescited by 49
- 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 47
- 2023Unveiling Memorization in Code Modelscited by 29
- 2023Traces of Memorisation in Large Language Models for Codecited by 26
- 2024Robustness, Security, Privacy, Explainability, Efficiency, and Usability of Large Language Models for Codecited by 26
- 2024Poro 34B and the Blessing of Multilingualitycited by 18
- 2022Formalizing Human Ingenuity: A Quantitative Framework for Copyright Law's Substantial Similaritycited by 15
- 2023A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challengescited by 14
- 2021A Search-Based Testing Framework for Deep Neural Networks of Source Code Embeddingcited by 12
- 2023The (ab)use of Open Source Code to Train Large Language Modelscited by 9
- 2023Characterizing Deep Learning Package Supply Chains in PyPI: Domains, Clusters, and Disengagementcited by 3
- 2024PyRadar: Towards Automatically Retrieving and Validating Source Code Repository Information for PyPI Packagescited by 3
- 2023Whose Text Is It Anyway? Exploring BigCode, Intellectual Property, and Ethicscited by 2
- 2023Understanding and Remediating Open-Source License Incompatibilities in the PyPI Ecosystemcited by 2
- 2023Detecting and Fixing Violations of Modification Terms in Open Source Licenses during Forkingcited by 1
Built on by
Citing papers per year: 2025: 7; 2026: 6.
13 papers.
Sort:
By area:
- 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 110
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMscited by 6
- 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivitycited by 5
- 2026What Breaks When LLMs Code? Characterizing Operational Safety Failures of Agentic Code Assistantscited by 3
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Codecited by 1
- 2025code_transformed: The Influence of Large Language Models on Codecited by 0
- 2025CodeGenLink: A Tool to Find the Likely Origin and License of Automatically Generated Codecited by 0
- 2025Towards Privacy-Preserving Code Generation: Differentially Private Code Language Modelscited by 0
- 2025How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?cited by 0
- 2026AI Supply Chain Galaxy: 3D Visual Analytics for License Compliancecited by 0
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvementscited by 0
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verificationcited by 0
- 2026Type-IV Code Clone Detection via Layer-Wise Non-Contrastive Representation Learning15 Sep 2026
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification7 Sep 2026
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements29 Jul 2026
- 2026AI Supply Chain Galaxy: 3D Visual Analytics for License Compliance15 Jun 2026
- 2026What Breaks When LLMs Code? Characterizing Operational Safety Failures of Agentic Code Assistants29 May 2026
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code13 May 2026
- 2025How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?17 Dec 2025
- 2025Towards Privacy-Preserving Code Generation: Differentially Private Code Language Models12 Dec 2025
- 2025CodeGenLink: A Tool to Find the Likely Origin and License of Automatically Generated Code1 Oct 2025
- 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivity24 Sep 2025
- 2025code_transformed: The Influence of Large Language Models on Code13 Jun 2025
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs27 May 2025
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMscited by 6
- 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivitycited by 5
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Codecited by 1
- 2025code_transformed: The Influence of Large Language Models on Codecited by 0
- 2025CodeGenLink: A Tool to Find the Likely Origin and License of Automatically Generated Codecited by 0
- 2025Towards Privacy-Preserving Code Generation: Differentially Private Code Language Modelscited by 0
- 2026AI Supply Chain Galaxy: 3D Visual Analytics for License Compliancecited by 0
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verificationcited by 0
- 2026Type-IV Code Clone Detection via Layer-Wise Non-Contrastive Representation Learningcited by 0
- 2026Type-IV Code Clone Detection via Layer-Wise Non-Contrastive Representation Learning15 Sep 2026
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification7 Sep 2026
- 2026AI Supply Chain Galaxy: 3D Visual Analytics for License Compliance15 Jun 2026
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code13 May 2026
- 2025Towards Privacy-Preserving Code Generation: Differentially Private Code Language Models12 Dec 2025
- 2025CodeGenLink: A Tool to Find the Likely Origin and License of Automatically Generated Code1 Oct 2025
- 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivity24 Sep 2025
- 2025code_transformed: The Influence of Large Language Models on Code13 Jun 2025
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs27 May 2025