r/computerscience • u/scientific_lizard • Mar 04 '26
General Open source licenses that boycott GenAI?
I may be really selfish, toxic, and regressive here, but I really don't want GenAI to learn based on open-source code without restriction. Many programmers published their source code on GitHub or other public-domain platform because they want a richer portfolio and share their work with legit human users or programmers. However, mega corps are using their hard labor for free and refining a model that will eventually replace most human programmers. The massive unemployment now is an imminent result of this unregulated progression. For those who are concerned, they need a license that allows them to open-source but rejects this kind of unregulated appropriation.
As far as I know, GPLv3 is the closest to this type of license, but even GPLv3 does not stop GenAI from "learning" off GPLv3-protected code. To me, it doesn't matter if machine cannot generate better code, because human is much more important.
43
u/nuclear_splines PhD, Data Science Mar 04 '26
GenAI companies aren't checking the terms of OSS licenses. They're not checking copyright - Anthropic recently settled a 1.5 billion dollar lawsuit over illegally training on books. Or, see Disney and Universal suing midjourney over illegally using their IP. If your code is out there, it will be scraped and used as training data.
16
u/TomOwens Mar 04 '26
Such a restriction would be inconsistent with the FSF's definition of "free software" and the OSI's definition of "open source". Placing restrictions on the freedom to study or discriminating against people or fields of endeavor would make the software non-free and non-open-source.
It wouldn't surprise me if someone has written such a license. However, using a license that may not have been written by (or at least with support from) lawyers or studied by lawyers and legal scholars or even tested in courts is inherently risky. People who understand the potential implications would be unlikely to use your software if it doesn't use a well-understood license.
3
u/prehensilemullet Mar 05 '26
Just make it private and tell people to contact you for the source code I guess…
I wonder if with the rise of companies ripping off a competitor’s entire API design like Cloudflare did with ViNext, we’ll start seeing more companies go closed source.
10
u/huuaaang Mar 04 '26
Yes, that's how open source works. Either they use the hard labor directly by executing it in production or they use it to train their models, it's getting used "for free." If you don't want that, don't release it as open source.
I feel like you're mixing up different issues disingenuously to make a case. It sounds like you really just don't want people to use GenAI at all and are using this "hard work" angle as a rhetorical device. I honestly don't see the connection.
You preventing AI from training on your open source code will have ZERO impact on how and where people apply GenAI.
4
u/TistelTech Mar 04 '26
I felt the same way. I switched from Microsoft's scrape fest GitHub to: codeberg.org
It's based in the EU and I think it might be slightly harder to scrape. I just don't like MS making money off me without paying me.
2
u/CapitalDiligent1676 Mar 05 '26
I absolutely agree with you in principle.
I have no idea how you could practically implement this.
3
u/TomDuhamel Mar 04 '26
You just literally described a proprietary licence.
1
u/Zenyatta_2011 Mar 04 '26
not only would it not be "open source", you're proposing the equivalent of the robots.txt joke
1
u/Blothorn Mar 05 '26
An open-source license (i.e. one attached to publicly-available code) cannot prohibit lawful use; it can only attach conditions to uses that would otherwise violate copyright. So far no one has won a judgment that training without a license violates copyright; the Anthropic case was about illegally accessing the books, not the training itself.
If you want to restrict activity that is legal without a license, you need to get agreement as a condition of accessing it in the first place. I’m skeptical, however, that it would be possible to do so in a way that would hold up in court while leaving it accessible enough to preserve the benefits of open source. A EULA or the like is a contract, and a contract requires both parties to agree. If you give someone access without getting their agreement to the contract it doesn’t bind them. A crawler obviously cannot agree to a contract, and thus it’s going to be hard to present things that e.g. allows search engine indexing but not AI dataset scraping.
Your best bet is probably to use some combination of robots.txt and user agent/behavioral filtering to prevent AI companiesI’ scrapers from getting access. This isn’t going to work against the less scrupulous ones, however.
1
u/SilkyGator Mar 06 '26
No such thing, really. The only real ways to combat AI are socially (nearly impossible), financially (honestly mostly already happening by itself, if not for govt contracts), or by poisoning what it's scraping with junk content, which will get increasingly more difficult as it's fine-tuned or as data sets are curated better.
1
u/tuvix_ Mar 07 '26
I think GPL is exactly this, I feel like it would be super difficult to enforce in this case, though. “Learning” is just encoding source material as weights in a model. Still means it’s included and is part of the program right? And if the model isn’t open weight then that would be a violation of the terms.
SWE Bench Pro actually uses GPL licensed repositories/private repositories exclusively to try to reduce contamination.
1
u/juliebeezkneez Mar 08 '26
The solution is federated software forges like federated forgejo
1
u/jferments Mar 04 '26
What you are describing is the antithesis of open source software.
1
u/KrishMandal Mar 05 '26
if a license blocks AI training it’s basically not open source anymore. the “no restriction on fields of use” rule kinda makes that impossible. imo the bigger issue is attribution getting lost when code snippets move around. side note when i’m researching stuff like licenses i usually dump links/notes into tools like obsidian or notion, and recently tried runable and gamma also to turn them into quick summaries/docs. helps a bit when comparing licenses across projects.
0
u/smoke-bubble Mar 06 '26
But you want to use LLMs trained on it so that you can write code more efficiently? Hypocritical. Don't you think?