Large Language Models (LLMs) have transformed machine learning but raised significant legal concerns due to their potential to produce text that infringes on copyrights, resulting in several high-profile lawsuits. The legal landscape is struggling to keep pace with these rapid advancements, with ongoing debates about whether generated text might plagiarize copyrighted materials. Current LLMs may infringe on copyrights or overly restrict non-copyrighted texts, leading to these challenges: (i) the need for a comprehensive evaluation benchmark to assess copyright compliance from multiple aspects; (ii) evaluating robustness against safeguard bypassing attacks; and (iii) developing effective defenses targeted against the generation of copyrighted text. To tackle these challenges, we introduce a curated dataset to evaluate methods, test attack strategies, and propose lightweight, real-time defenses to prevent the generation of copyrighted text, ensuring the safe and lawful use of LLMs. Our experiments demonstrate that current LLMs frequently output copyrighted text, and that jailbreaking attacks can significantly increase the volume of copyrighted output. Our proposed defense mechanisms significantly reduce the volume of copyrighted text generated by LLMs by effectively refusing malicious requests. Code is publicly available at https://github.com/xz-liu/SHIELD
翻译:大型语言模型(LLMs)已经改变了机器学习领域,但由于其可能生成侵犯版权的文本,引发了重大的法律关切,并导致了数起备受瞩目的诉讼。法律体系难以跟上这些快速的技术发展,关于生成文本是否可能抄袭受版权保护材料的争论持续不断。当前的LLMs可能存在侵犯版权或过度限制非版权文本的问题,从而引发出以下挑战:(i)需要建立全面的评估基准,从多维度评估版权合规性;(ii)评估模型针对规避安全防护攻击的鲁棒性;(iii)开发针对版权文本生成的有效防御机制。为应对这些挑战,我们引入了一个精选数据集,用于评估现有方法、测试攻击策略,并提出轻量级的实时防御方案以防止版权文本的生成,从而确保LLMs的安全合法使用。我们的实验表明,当前LLMs频繁输出受版权保护的文本,且越狱攻击能显著增加版权内容的输出量。我们提出的防御机制通过有效拒绝恶意请求,显著降低了LLMs生成的版权文本数量。代码已公开于 https://github.com/xz-liu/SHIELD。