AI Trained on Open Source Should Be Open Source Too

All AI-generated code should be Open Source

We trained these models on decades of open source code that developers shared freely, then locked the output behind proprietary APIs. That doesn't sit right with me.

Since RMS announced the GNU Project in 1983, programmers have released millions of lines of code under licenses that asked for attribution and sharing. GitHub and the rest of the internet scraped it all anyway. No permission, no credit, no license compliance. Just training data. Now when you ask an AI assistant to write a function, the result comes out copyrighted by the company that owns the model, not by you, and definitely not open source.

I think that's legally wrong. My take is that purely AI-generated code shouldn't be copyrightable at all. The monkey selfie case established that only humans can hold copyright, and a model isn't a person. If the code came out of a system trained on the commons, it should belong to the commons.

But here's where it gets messy. Even if you accept that argument, you're still depending on black box models that companies can restrict, rate limit, or shut down whenever they want. And if the next generation of models gets trained on proprietary code instead of open source, we'd be slapping an open source label on output that's legally and ethically a lot murkier than it looks.

The Unpaid Debt to Open Source

The training data for most large language models includes code from the GNU Project and thousands of GPL, MIT, and Apache-licensed repositories scraped without attribution or consent. This isn't a legal gray area anymore; it's an extraction of labor that created a moral obligation to the developers who wrote it. When a model outputs code that resembles a GPL-licensed function, it isn't citing the source, and the license terms that required sharing modifications are effectively void.

This is where the copyright question makes things worse. If AI-generated code is not copyrightable, releasing it under an open source license is meaningless. What's the point, if you can generate infinite code? The licenses that govern open source (GPL's copyleft, MIT's attribution requirements, Apache's patent grants) assume a human author who holds rights and can enforce them. An AI has no rights to grant, so slapping an MIT header on generated output is legally hollow.

Here's a script that checks whether files in a directory actually carry license headers, which is the minimum bar most open source projects enforce:

#!/bin/bash
for file in *.py; do
    if ! head -n 5 "$file" | grep -qi "license\|copyright"; then
        echo "Missing license header: $file"
    fi
done

My take is that companies training on this code should fund the maintainers directly, not just release their own models under open source licenses that don't actually protect anything. The limitation here is that even if you want to comply, current copyright law doesn't recognize AI as an author, so there's no mechanism to attribute or compensate the original developers through the license itself. Compared to the 1980s GNU Project, which operated within a legal framework where copyright meant something, today's models consume licensed code and output text that can't be copyrighted, leaving the original authors with no legal claim and no payment.

Licensing AI Output in Practice

Open-by-default sounds like the obvious choice for developers, but the legal ground shifts underneath it. The US Copyright Office has ruled that AI-generated code without sufficient human creative input isn't copyrightable, which means you can't actually license it. As one observer put it, "If AI generated code is not copyrightable, releasing it under an open source license is meaningless." My take is that open-by-default still matters as a social contract and for tooling interoperability, but you shouldn't treat the license as legally binding on the raw output.

In practice, open-by-default means no attribution strings baked into the model and no restrictions on how you use the output. That differs sharply from proprietary tools like GitHub Copilot, which assert ownership over suggestions or restrict redistribution. With open models, the copyleft question only bites when you add substantial human-authored code on top; that layer is copyrightable and can carry a GPL or MIT license, but the AI-generated base sits effectively in the public domain.

The limitation is that copyleft licenses depend on copyright to enforce their share-alike clauses. If the underlying code isn't copyrightable, a GPL header doesn't create a legal obligation for downstream users. Someone could reasonably ask, "What's the point, if you can generate infinite code?" The point is that licensing still signals intent and governs your human contributions, but it doesn't lock down the AI output itself.

for f in output/*.js; do
  { echo "// SPDX-License-Identifier: MIT"; echo "// Human modifications: Copyright 2024"; cat "$f"; } > "$f.tmp" && mv "$f.tmp" "$f"
done

Why Generated Code Should Stay Open

I think the argument for keeping generated code open is stronger than the "public good" framing suggests, but for different reasons. The models ingested decades of GPL and MIT code without asking, and now we're supposed to treat the output as proprietary by default? That's backwards. Openness isn't just a nice-to-have for generated code; it's the only way to audit what the model actually learned and whether it's reproducing copyrighted snippets verbatim. The community discussion around utility-style governance feels premature to me. Treating software like water or electricity assumes we've solved the attribution problem, and we haven't. Traditional licenses don't map cleanly onto generated output because there's no clear author to hold accountable—just a probabilistic soup of training data. But calling copyright "obsolete" ignores the real tension: if generated code is truly open, domain experts lose the ability to protect specialized knowledge that took years to build, yet if it's locked down, we're just recreating the same enclosure problem we started with. What the announcement misses is that "open" and "permissive for training" aren't the same thing. You can publish generated code under an open license while still asserting that scraping it to train the next model requires consent. That distinction matters because right now, the default assumption is that anything public is fair game, and that assumption is what actually threatens the open source commons. There's also a technical gotcha the announcement doesn't mention: if we flood the commons with synthetic code and train the next generation on that output, we risk model collapse—the documented degradation that occurs when models consume their own recycled predictions instead of human-written code. Will we end up with a two-tier system where foundational code stays open but specialized applications get walled off, or will the pressure to keep everything open simply accelerate the decline of sustainable open source maintenance? I don't know, but I suspect the second outcome is more likely unless we figure out attribution first.

Conclusion

The legal footing is shakier than the ethical one. The Monkey Selfie ruling gives US courts a clean precedent—non-humans can't hold copyright—but the UK already grants limited protection to computer-generated works, and that divergence means any global push to open-license AI output will hit a wall the moment it crosses a border. Layer on the reality that most developers aren't reviewing generated code line-by-line, and you've got output whose legal status depends on whether someone happened to read the diff. I still think we owe the open source community more than a footnote. We scraped decades of code written since RMS announced the GNU Project without permission, and treating the result as proprietary feels like the final insult. But I'm not convinced the courts will agree, and I'm even less convinced developers will start checking licenses on code they didn't write. We'll probably end up with a patchwork of rulings and corporate policies that satisfy no one—just the messy cost of building on borrowed work.

Related posts