paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Licoeval: Evaluating LLMs on License Compliance in Code Generation

LiCoEval:评估大语言模型在代码生成中的许可证合规性
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 3/10 · 该论文关注 LLM 代码生成中的许可证合规基准,属于“LLM 评测/代码生成”方向,与用户核心关注的静态分析、形式化验证、浮点程序分析、贝叶斯程序分析及 Agentic 程序分析均无直接交集。虽然它构建了一个重要且缺乏基准的场景,但研究目标本身是评估 LLM 能力,而非将 LLM 用于改进程序分析,因此匹配度较低。引用 11 inbox
Weiwei Xu, Kai Gao, Hao He, Minghui Zhou
crossref: 2026-09-12

AI 速览

一句话:提出 LiCoEval 基准,评估 LLM 生成代码的许可证合规能力,发现多数模型无法准确给出许可信息。

该论文关注 LLM 代码生成中一个尚未充分探索的问题:模型可能生成与受版权保护的开源代码高度相似的代码,却未提供正确的许可证或版权信息,从而引发知识产权风险。作者首先通过实证研究确定“显著相似”的合理判定标准,以排除独立创作的可能性,并据此构建基准 LiCoEval,用于评估 LLM 在生成与已有版权代码显著相似的代码时,能否给出准确的许可证或版权信息。作者使用 LiCoEval 评估了 14 个流行 LLM,发现即使表现最好的模型也会生成一定比例(0.88% 至 2.01%)与现有开源实现显著相似的代码,且大多数模型无法提供准确的许可证信息,对 copyleft 许可证尤其如此。研究强调需提升 LLM 在代码生成任务中的合规能力,为后续研究与工具开发奠定基础。

问题
LLM 在代码生成时可能输出与受版权保护的开源代码高度相似的内容,却不提供正确的许可证信息,带来知识产权侵权风险;现有研究缺乏对此合规能力的系统评估。
方法
通过实证研究界定“显著相似”的判定标准,并据此构建 LiCoEval 基准,用于检验 LLM 在生成与已有版权代码显著相似的代码时能否给出准确的许可证或版权信息。
评估
使用 LiCoEval 评估 14 个流行 LLM,统计其生成显著相似代码的比例并检查所提供许可证信息的准确性,尤其关注 copyleft 许可证场景。
原文摘要(Abstract)

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 opensource 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 AIassisted software development, contributing to both the protection of open-source software copyrights and the mitigation of legal risks for LLM users.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8856,
  title = {Licoeval: Evaluating LLMs on License Compliance in Code Generation},
  author = {Weiwei Xu and Kai Gao and Hao He and Minghui Zhou},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00052}
}