Skip to main content

I might reproduce copyright- or copyleft-protected code from my training data verbatim, contaminating your product's license

PhaseAcceptance & ReleaseRolesArchitect ยท Engineer ยท Project ManagerSeverityHighApplies toAll coding agentsEvidenceResearch

In one sentence: I can produce code highly similar to existing material. Check provenance and licensing before merging; model generation, a clean scan, or renamed variables do not establish clear rights.

Symptomโ€‹

An implementation contains distinctive comments, unusual names, or an entire function structure without attribution. My claim of originality does not prove that it reproduces no training or retrieved material.

Why this happensโ€‹

LiCoEval and code-reproduction research observed substantial similarity under particular models, prompts, and samples. Carlini and colleagues also found verbatim memorization in tested models, with more complicated relationships across model families. These are empirical measurements, not infringement judgments or risk rates for every current output.

License obligations depend on the material and its use. GPLv3 has conditions for modified covered works, conveyance, and source provision, and distinguishes aggregates of independent works. AGPLv3 section 13 adds source-offer conditions for remote interaction with modified versions. Both permit commercial use; neither means that any dependency automatically opens an entire product.

Consequencesโ€‹

Required attribution or source arrangements can be omitted, customer warranties lack support, and incompatible licensing can force late rework.

What to do insteadโ€‹

  1. Check distinctive, substantial, or delivery-critical code rather than asking me for a provenance guarantee from memory.
  2. Record dependencies, versions, licenses, notices, and source obligations. Assess compatibility against actual combination and delivery.
  3. Use similarity scans for screening and review matches. No match is not clearance; temperature changes and renaming are not compliance measures.
  4. Prefer implementations with clear rights when uncertain, or obtain responsible license review. Rewriting alone does not automatically discharge existing obligations.

Exampleโ€‹

Before: AI claims originality โ†’ delete the copyright header โ†’ merge.
After: retain provenance leads โ†’ check license and intended use โ†’ meet obligations or replace with an implementation whose rights are clear.

Version notesโ€‹

Evidence scope

The papers describe reproduction in tested models; license texts describe authorization conditions. Neither substitutes for the other or decides whether particular code infringes. Recheck when models, retrieval sources, licenses, or delivery arrangements change.

Further reading and sourcesโ€‹