AI-generated code should be open source by default

A network of glowing threads emerging from an open book, weaving into a transparent AI core, then branching into new code streams that flow back into identical books on a circular shelf — light symbol

Artificial intelligence now writes significant portions of software, often drawing from decades of publicly shared code. Yet most AI-generated code ends up in proprietary systems, raising ethical and legal questions. Jakub Jankiewicz argues that because AI models were trained on open source projects, Stack Overflow, and other community-driven resources, the code they produce should be open by default.

Built on open knowledge

AI code generators like GitHub Copilot or Meta’s Code Llama rely on vast datasets of publicly available code. This includes software released under licenses such as GPL, MIT, and BSD — often with conditions like attribution or share-alike clauses. Stack Overflow and Stack Exchange content is licensed under Creative Commons Attribution-ShareAlike (CC BY-SA), which legally requires credit when reused.

However, AI training typically involves bulk scraping without attribution, effectively bypassing these terms. When companies then use AI to generate code and keep it closed, they benefit from open contributions without reciprocity.

This creates a one-way flow: public knowledge feeds private profit. Open source has historically thrived on mutual contribution, but AI disrupts that balance. The argument is not just moral — it’s about sustaining the ecosystem that made modern AI possible.

Legal uncertainty around AI authorship

In the US, copyright law does not protect works created solely by non-humans. The precedent comes from the ‘monkey selfie’ case, where a primate took a photo using a photographer’s camera. The U.S. Copyright Office later applied this logic to AI, stating that works without human authorship cannot be copyrighted. This suggests AI-generated code may default to the public domain.

However, this isn’t universal. The UK’s Copyright, Designs and Patents Act grants 50 years of protection to ‘computer-generated works’, treating them as authored by the person who made the arrangements for creation. Other jurisdictions vary. This patchwork creates legal risk: a piece of code could be public domain in the US but protected in the UK, complicating global software distribution.

What it means for businesses

For UK, UAE, US, and Kazakh tech firms, this debate touches on risk, cost, and control. Relying on closed AI-generated code may expose companies to future liability, especially if training data lawsuits succeed. Open sourcing such code reduces legal exposure and builds trust.

It also affects competitiveness. Firms that contribute back may gain goodwill and community support, while those seen as extractive could face backlash. In open source-heavy sectors like cloud infrastructure or DevOps, reputation matters.

For startups, adopting open practices early can reduce dependency on proprietary AI vendors. It encourages internal review and adaptation, leading to more secure, maintainable systems.

Fairness over friction

The call for open-sourcing AI-generated code isn’t about limiting innovation — it’s about fairness. The open source community provided the foundation; it’s only right that AI gives back. While legal frameworks lag, voluntary standards can guide responsible use.

Businesses should assess how much AI contributes to their codebase and consider open-sourcing outputs where human input is minimal. This strengthens the ecosystem, reduces risk, and aligns with the values that built modern software.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *