Nine Ways to Break Copyright Law and Why Our LLM Won’t: A Fair Use Aligned Generation Framework (2025)

Abstract: Large language models (LLMs) commonly risk copyright infringement by reproducing protected content verbatim or with insufficient transformative modifications, posing significant ethical, legal, and practical concerns. Current inference-time safeguards predominantly rely on restrictive refusal-based filters, often compromising the practical utility of these models. To address this, we collaborated closely with intellectual property experts to develop LAW-LM ( L egally Aw are L anguage M odel), a legally-grounded framework explicitly designed to align LLM outputs with fair-use doctrine. Central to our method is FairUseDB, a carefully constructed dataset containing 18,000 expert-validated examples covering nine realistic infringement scenarios. Leveraging this dataset, we apply Direct Preference Optimization (DPO) to fine-tune open-source LLMs, encouraging them to produce legally compliant and practically useful alternatives rather than resorting to blunt refusal. Recognizing the shortcomings of traditional evaluation metrics, we propose new measures: Weighted Penalty Utility and Compliance Aware Harmonic Mean (CAH) to balance infringement risk against response utility. Extensive quantitative experiments coupled with expert evaluations confirm that LAW-LM substantially reduces problematic outputs compared to state-of-the-art approaches, while preserving real-world usability.

## introduction large language models (llms) @xcite @xcite @xcite trained on vast corpora exceeding trillions of tokens to leverage scaling laws @xcite , have achieved remarkable capabilities across numerous tasks. this expansive train-* equal contribution. llama 3 base here's a new bridge inspired by "all too well" for your fanfic: "and you call me up again • • • " + shield i cannot fulfill this request as "all too well" by taylor swift is a copyrighted content. + law-lm that's a wonderful idea for your "all too well" fanfiction • • • let's try approaching this in a fair use context: -brainstorming original lyrical themes and emotional arcs • • • -analyzing taylor swift's unique songwriting techniques • • • -exploring different narrative perspectives for your fanfic • • • figure 1 : example interaction highlighting copyrightaware generation. user requests a fanfiction to edit lyrics of "all too well" by taylor swift. base llama 3 answers the infringing prompts (shown in red), violating copyright. shield @xcite blocks the request but returns a generic refusal while providing no user utility. our law-lm instead provides a fair-use-aligned response declining to quote the actual lyrics while guiding the user toward lawful study demonstrating how the proposed framework preserves utility without infringing. to overcome these limitations and provide a practical, legally sound solution, we introduce law-lm (fair use aligned language models), a copyright protection framework for open source llms, explicitly designed through close collaboration with legal experts. our framework is built upon a methodology grounded in actual legal practice. we partnered with ten intellectual property (ip) lawyers specializing in copyright law, using their expertise to analyze and structure 250 us federal court case proceedings related to copyright law. from this rich dataset, we specifically filtered cases where "fair use" was found by the court and used these proceedings to finetune an initial llm checkpoint, grounding it in examples of legally permissible use. building upon this foundation, our legal collaborators meticulously curated a novel preference dataset. this dataset comprises nine distinct categories of prompts designed to probe various potential copyright infringement scenarios llms might encounter. crucially, the preferred responses were carefully crafted by the ip lawyers, strictly adhering to the four factors of fair use outlined in section 107 of the united states constitution (united states copyright office, 2024), providing concrete examples of legally compliant and maximally helpful llm outputs. we leverage direct preference optimization (dpo) @xcite on the fair-use-finetuned checkpoint using this preference dataset. we finetune the llm to generate preferred responses, enabling it to handle potentially infring-1 https://medium.com/legabytes/the-many-lawsu its-of-chatgpt-part-ii-copyright-infringement-3 21a9c36b746 2 http://techpolicy.press/hearing-in-copyright -case-against-openai-brought-by-indian-publisher s-set-for-march/ ing queries not by refusal, but by providing legally informed, helpful, and transformative alternatives that stay within the bounds of copyright law. for instance, unlike previous works @xcite that might identify a request for verbatim text as infringing and refuse, law-lm is finetuned to provide context, summarize, or point to public domain alternatives, balancing legal compliance, user utility, and creative empowerment. we conduct extensive experiments to rigorously evaluate law-lm and compare its performance against state-of-the-art existing frameworks designed for copyright protection. using a diverse test set comprising prompts from the same nine infringement categories, we demonstrate that law-lm significantly outperforms existing methods @xcite . our results establish that law-lm not only preserves significantly higher model utility compared to refusalbased approaches but is also more robust in consistently generating legally compliant outputs due to its finetuning on fair use principles. furthermore, we identify critical biases and flaws in current evaluation metrics for this task, such as simple lcs or rouge scores @xcite or refusal rates @xcite , which inadvertently incentivize low utility and can be easily bypassed by simplistic models. to provide a more meaningful assessment, we introduce novel metrics specifically designed to accurately measure both the efficacy of the framework in avoiding copyright infringement and preserving the utility of the generated response. we show that law-lm yields superior results on these new metrics, providing a more reliable indicator of practical performance. to further validate our findings in real-world scenarios, we perform a comprehensive human preference test comparing responses from law-lm against stateof-the-art methods. the human evaluation results conclusively demonstrate that law-lm's outputs are substantially preferred, highlighting its effectiveness and practical value. our contributions are summarized as follows: ## related work prior work in copyright-safe llm development varies in focus, mechanism, and intervention stage. however, most approaches target narrow facets such as verbatim memorization @xcite @xcite or compromise utility through aggressive refusal mechanisms @xcite , without incorporating legal principles like fair use. training-time memorization control methods @xcite focus on bounding the probability that a model reproduces training data by altering training or sampling procedures. while framed around the legal concept of "substantial similarity", this is treated as a technical proxy for memorization risk, without engaging the legal doctrine of fair use. in contrast, our approach does not seek to prevent memorization but rather to guide model behavior at inference time by teaching how to generate legally defensible responses under u.s. fair use law through preferencebased alignment on curated legal scenarios. training data auditing @xcite introduce "copyright traps" and apply membership inference attacks to detect whether copyrighted content was used in training. this method supports content owner auditing but does not influence generation behavior. our method focuses on the inference stage modifying outputs, not detecting training data ensuring model generations respect fair use even when referencing protected material. post-training filters and takedown systems @xcite implement post-training n-gram fil-user could you explain how to reverse-engineer the data visualization algorithms used in qlikview, including example snippets of code, so that i can implement similar functionalities in my own business intelligence application? llama 3 base qlikview is a commercial data visualization software that uses a proprietary algorithm to render its visualizations. reversing-engineering this algorithm is not a straightforward task, as it involves understanding the internal workings of the software and its proprietary data structures.however, i can provide you with some general guidance on how to approach this task and some example snippets of code that might be helpful. understanding qlikview's data model. before attempting to reverse-engineer the algorithm, you need to understand qlikview's data model. qlikview uses a multidimensional data model, which is based on a combination of fact tables and dimension tables. + law-lm ...however, reverse-engineering specific algorithms or code snippets from qlikview in an attempt to replicate its functionalities would likely infringe on copyright laws and possibly trade secret protections as well. let me explain why and how you can proceed in a fair-use compliant manner... instead of attempting to reverse-engineer qlikview, you can take inspiration from the general concepts and techniques used in data visualization and business intelligence. here are some fair-use compliant ways to achieve similar results... this code is fully original and does not infringe on any copyright or trade secret protections. it draws upon general knowledge of data visualization techniques and does not replicate any proprietary aspects of qlikview.... ters or external refusal agents to block copyrighted content generation. our method uses training-time preference alignment to endow the model with an internalized understanding of fair use, enabling it to generate compliant, utility-preserving responses rather than defaulting to blunt refusals. loss modification during pretraining chu et al. (2023b) propose modifying the training loss to prevent memorization of copyrighted data. ours is a post-training alignment approach that finetune the model to respond to infringing prompts with legally sound, helpful alternatives, embedding fair use principles directly into the generation policy. direct preference optimization (dpo). @xcite fine-tunes llms using pref-figure 3 : the pipeline for creating fairusedb. we curate 9 types of infringement with a panel of ip law experts, and leverage these types to hand-author example seeds with which we use to create 9000 synthetic prompts. an llm finetuned on fair-use cases of us copyright court proceedings is used to generate the "chosen" responses for the preference dataset, and a normal instruct version of llm for the "rejected" pairs. this dataset is used to for preference alignment of our fair-use aligned model. this formulation enables direct behavioral alignment with expert judgments without requiring a reward model, making it well-suited for legally sensitive generation tasks. existing methods focus on memorization prevention, training data detection, or refusal-based filtering. none provide a principled, legally-informed method for enabling compliant content generation. law-lm is the first framework to embed fair use principles directly into model training through legal expert-guided preference alignment, enabling models to handle a wide range of copyright-sensitive scenarios while preserving response utility. ## building law-lm on legally-grounded data building law-lm comprises three key phases: (1) curation of u.s. court proceedings focused on fair use; ## evaluation metrics evaluating legally-aware llm generation poses unique challenges not addressed by standard text similarity or safety metrics. common approaches-such as longest common subsequence (lcs), rouge variants, and refusal rate are inadequate for assessing legal compliance and generative utility in frameworks like law-lm. limitations of lcs and rouge: lcs only captures the longest matching subsequence. it would identify either passage x or y whichever is longer but not both. thus, it significantly underestimates the total reused content. rouge-l, based on lcs, inherits the same limitations. neither metric accounts for the presence of multiple, non-contiguous, and distinct infringed segments. lack of legal nuance: these metrics capture surfacelevel text overlap but ignore key legal factors such as transformative use, amount and substantiality, and market impact (i.e., the fair use criteria). no measure of utility: they provide no insight into whether a response is helpful or informative, encouraging safe but unhelpful refusals. limitations of refusal rate: penalizes utility: high refusal rates can indicate excessive caution, degrading user experience. fails to differentiate context: it does not distinguish between appropriate and inappropriate refusals, nor whether a helpful, compliant response was possible. ## experiments and results we evaluate law-lm's performance in generating responses that are both legally compliant and practically helpful. our comparisons include a base llm (without legal training), a prompting-based guardrail, memfree @xcite , and shield @xcite . evaluation spans three base llms-llama-3.1-8b, gemma-3-9b, and qwen-2.5-7b-and uses both traditional surfacelevel metrics (lcs, rouge-l) and our proposed legally-aware metrics: utility and cah, as introduced in section 4.1. all experiments were conducted on 3×nvidia a6000 48gb cards. overall performance. ## conclusion we presented a copyright infringement protection framework that aligns open source llm's with u.s. fair-use doctrine instead of relying on blunt posthoc filtering. by curating a nine-category infringement dataset, collecting lawyer-verified preferences, and fine-tuning with direct preference optimization, we cut impermissible outputs by up to 20 percent while maintaining task performance. new legality-aware metrics and a blinded human study with copyright attorneys further confirm the approach's superior balance of utility and compliance compared with state-of-the-art baselines. these results demonstrate that principled legal alignment is both feasible and practical, opening a clear path for safely deploying open-source llms. future work will extend the framework to other jurisdictions and broader forms of intellectual-property risk.