Licensing, Consent, and Data-Use Signals › Text and data mining exceptions
Language AI HandbookAll chapters Text and data mining exceptions differ by jurisdiction. Article 4 of the EU Digital Single Market Directive addresses reproductions and extractions of lawfully accessible material for text and data mining. An appropriate express reservation by the rightsholder can take those acts outside the exception. A pipeline needs evidence for the basis it invokes, including any conditions on access and reservations.
The EU's two-tier exception and the opt-out
Articles 3 and 4 of Directive (EU) 2019/790 establish separate exceptions or limitations for text and data mining.
Article 3 covers reproductions and extractions for scientific text and data mining by qualifying research organisations and cultural heritage institutions that have lawful access. Article 7 makes contractual provisions contrary to Article 3 unenforceable.
Article 4 provides an exception or limitation for specified reproductions and extractions of lawfully accessible material for text and data mining. Its scope can include commercial mining, subject to the applicable implementation. Article 4(3) conditions the exception on the absence of an appropriate express reservation by the rightsholder. For material made publicly available online it gives machine-readable means as an example.
For material made publicly available online, Recital 18 points to machine-readable means, including metadata and website or service terms. It also notes that contractual agreements or unilateral declarations can be appropriate in other cases.
Check the actor and purpose before selecting a basis. A qualifying institution carrying out scientific research can assess Article 3. A commercial developer assessing Article 4 must check lawful access and whether a rightsholder made an appropriate reservation. The applicability of national implementing law also needs to be established.
For Article 4, a reservation is a rightsholder’s express statement reserving the relevant use in an appropriate manner. For publicly available online content, the directive gives machine-readable means as an example.
Keep dated snapshots of the evidence available at collection and record further checks when the contemplated use or the signals change. A later fetch cannot establish what a page showed at an earlier time. Record which artifact you checked, when you checked it, and which use the check covered.
Machine-readable reservations and their carriers
There is no single universal carrier. A production pipeline meets several:
robots.txtcan carry product-specific signals. Keep the applicable token and the snapshot. Assess separately whether the signal qualifies as a reservation for the intended act under the applicable law.- TDMRep, a W3C Community Group protocol, carries the
tdm-reservationflag in an HTTP response header, HTML metadata or an origin-level TDM file. A separatetdm-policyURL can link to more information or terms. - Content credentials can bind a signed provenance claim to an asset. C2PA 1.x included a native Training & Data Mining assertion, which version 2.0 removed. Record the schema and version if a legacy or separately defined field expresses a data-use preference. Verify the applicable authority separately.
- Proposed conventions include Spawning’s
ai.txt. Record the particular convention, the party that supplies it and whether your collection policy recognizes it.
The practical problem is that none of these is universal, several are ambiguous about which use they reserve, and adoption is uneven. A pipeline must support multiple carriers, record which ones it checked and found absent, and default to restrictive when a carrier is present but unparseable. Silence is a default, not consent. The absent-carrier recording is a detail worth emphasizing, because it distinguishes a manifest that says "we checked and found no reservation" from one that says "we did not check". Those are very different audit statements. The first is a positive claim about the document's state; the second is an admission of ignorance. A pipeline that records the positive claim without performing the check is worse than one that records ignorance, because the first creates false confidence while the second invites follow-up.
The United States: fair use, factor by factor
For a US fair-use analysis, 17 U.S.C. §107 gives four nonexclusive factors. Evaluate the particular challenged use. A licence or another applicable permission may provide a separate basis.
- Purpose and character of the use, including commerciality and transformativeness.
- Nature of the copyrighted work, including whether it is primarily factual or creative.
- Amount and substantiality of the portion used.
- Effect on the market for the work, including markets for derivative works.
Andy Warhol Foundation v. Goldsmith (2023) assessed purpose and character with reference to the specific challenged use. Keep the same distinction when reading the training cases above. A court's analysis depends on which particular act was challenged and the record before it.
Keep a record of how the material was acquired, copied, used and shared. Bartz evaluated separate library and training copies. Kadrey considered the challenged downloads together with their training purpose and left a separate distribution claim outside that ruling. Identify the conduct at issue before drawing conclusions from either case.
For a US-facing pipeline, record the grant or other basis you rely on and the act it covers. If the policy routes a source to fair-use review, keep the acquisition evidence and the factor-by-factor assessment with the decision.
Other jurisdictions
Japan. Article 30-4 of the Copyright Act covers certain uses for purposes other than enjoying the thoughts or sentiments expressed in a work, including information analysis. The provision limits use to the extent necessary for the purpose and excludes uses that unreasonably prejudice the rightsholder's interests.
United Kingdom. Section 29A of the Copyright, Designs and Patents Act 1988 covers copying for computational analysis where the person has lawful access and the sole purpose is non-commercial research. It requires sufficient acknowledgement where possible and separately limits transfer and reuse.
Other jurisdictions. Check the law that applies to the act, then record the actor, purpose, conditions and evidence for any exception. The example policy below sends unresolved cases to review.
Which conditions to check when there is no licence
For a proposed mining operation, start with the applicable law and the actual use:
| Applicable law | Provision to check | Questions for the review |
|---|---|---|
| EU | Article 4 may cover qualifying reproductions and extractions | Was access lawful, and did the rightsholder appropriately reserve the use? |
| Japan | Article 30-4 | Does the use meet the non-enjoyment and necessity limits while avoiding unreasonable prejudice? |
| UK | Section 29A | Is this solely non-commercial research with lawful access, and are the acknowledgement and handling conditions satisfied? |
| US | Section 107 | What precise use is at issue, how was the material acquired, and what does the factor analysis show? |
Start the record with the applicable law, the act, and the proposed basis. If the review relies on EU Article 4, check lawful access and any appropriate express reservation. The UK, Japanese, and US examples ask different questions even when a publisher's signals are identical. Log whether you checked each relevant signal and what you found.
PythonIn [11]Expand
@dataclass(frozen=True)
class Profile:
"""The obligations and restrictions a licence imposes."""
name: str = ""
attribution: bool = False
share_alike: bool = False
no_derivatives: bool = False
non_commercial: bool = False
copyleft: bool = False
public_domain: bool = False
unknown: bool = False
LICENSES = {
"CC0-1.0": Profile(name="CC0 1.0", public_domain=True),
"CC-BY-4.0": Profile(name="CC BY 4.0", attribution=True),
"CC-BY-SA-4.0": Profile(
name="CC BY-SA 4.0", attribution=True, share_alike=True
),
"CC-BY-ND-4.0": Profile(
name="CC BY-ND 4.0", attribution=True, no_derivatives=True
),
"CC-BY-NC-4.0": Profile(
name="CC BY-NC 4.0", attribution=True, non_commercial=True
),
"CC-BY-NC-SA-4.0": Profile(
name="CC BY-NC-SA 4.0",
attribution=True,
non_commercial=True,
share_alike=True,
),
"MIT": Profile(name="MIT", attribution=True),
"Apache-2.0": Profile(name="Apache 2.0", attribution=True),
"GPL-3.0-only": Profile(name="GPL-3.0", attribution=True, copyleft=True),
"AGPL-3.0-only": Profile(name="AGPL-3.0", attribution=True, copyleft=True),
"LicenseRef-negotiated-commercial": Profile(
name="negotiated commercial licence"
),
}The example retains each known OR alternative. The score breaks ties between alternatives that produce the same screening outcome for the requested purpose.
The matrix below renders the profile map from the preceding cell. Each row is a toy licence profile and each column is one tracked flag.
PythonIn [12]Expand
license_columns = [
"attribution",
"share_alike",
"no_derivatives",
"non_commercial",
"copyleft",
"public_domain",
"unknown",
]
license_ids = [
"CC0-1.0",
"CC-BY-4.0",
"CC-BY-SA-4.0",
"CC-BY-ND-4.0",
"CC-BY-NC-4.0",
"CC-BY-NC-SA-4.0",
"MIT",
"Apache-2.0",
"GPL-3.0-only",
"AGPL-3.0-only",
"LicenseRef-negotiated-commercial",
]
license_labels = [LICENSES[identifier].name for identifier in license_ids]
license_matrix = np.array(
[
[
int(getattr(LICENSES[identifier], column))
for column in license_columns
]
for identifier in license_ids
]
)VisualizationOut [13]Expand

PythonIn [14]Expand
def restrictiveness(profile):
"""Higher means more onerous. Used only to pick between OR branches."""
score = 0
score += 64 if profile.unknown else 0
score += 8 if profile.non_commercial else 0
score += 4 if profile.no_derivatives else 0
score += 2 if profile.share_alike else 0
score += 2 if profile.copyleft else 0
score += 1 if profile.attribution else 0
return score
def merge_and(left, right):
return Profile(
name=f"{left.name} AND {right.name}",
attribution=left.attribution or right.attribution,
share_alike=left.share_alike or right.share_alike,
no_derivatives=left.no_derivatives or right.no_derivatives,
non_commercial=left.non_commercial or right.non_commercial,
copyleft=left.copyleft or right.copyleft,
public_domain=left.public_domain and right.public_domain,
unknown=left.unknown or right.unknown,
)
def profile_rank(profile, purpose):
if purpose is None:
return restrictiveness(profile), profile.name
if profile.non_commercial and purpose == "commercial_training":
outcome = 2
elif profile.no_derivatives:
outcome = 1
else:
outcome = 0
return outcome, restrictiveness(profile), profile.nameThis example uses recursive descent. In the supported subset, AND binds more tightly than OR.
PythonIn [15]Expand
TOKEN_RE = re.compile(r"\(|\)|[A-Za-z0-9.\-+]+")
class ExpressionParser:
"""Recursive-descent parser for the subset of SPDX we care about."""
def __init__(self, tokens):
self.tokens = tokens
self.pos = 0
def peek(self):
return self.tokens[self.pos] if self.pos < len(self.tokens) else None
def take(self):
token = self.peek()
self.pos += 1
return token
def parse(self):
node = self.parse_or()
if self.peek() is not None:
raise ValueError(f"unexpected token {self.peek()!r}")
return node
def parse_or(self):
node = self.parse_and()
while self.peek() == "OR":
self.take()
node = ("OR", node, self.parse_and())
return node
def parse_and(self):
node = self.parse_atom()
while self.peek() == "AND":
self.take()
node = ("AND", node, self.parse_atom())
return node
def parse_atom(self):
token = self.take()
if token == "(":
node = self.parse_or()
if self.take() != ")":
raise ValueError("unbalanced parentheses")
return node
if token is None or token in {"AND", "OR", "WITH", ")"}:
raise ValueError(f"unexpected token {token!r}")
return ("LIC", token)The evaluator keeps alternatives until it knows the purpose. The GNU later-version forms share the example’s flags while preserving the supplied identifier. Any unsupported or malformed branch sends the expression to review, including an unmapped branch alongside a recognized licence. This conservative fixture does not implement WITH expressions.
PythonIn [16]Expand
LATER_VERSION_PROFILES = {
"GPL-3.0-or-later": "GPL-3.0-only",
"GPL-3.0+": "GPL-3.0-only",
"AGPL-3.0-or-later": "AGPL-3.0-only",
"AGPL-3.0+": "AGPL-3.0-only",
}
def evaluate_expression(expression, purpose=None):
if len(expression) > 1024 or TOKEN_RE.sub("", expression).strip():
return Profile(name=expression, unknown=True)
try:
tree = ExpressionParser(TOKEN_RE.findall(expression)).parse()
except (ValueError, RecursionError):
return Profile(name=expression, unknown=True)
def walk(node):
if node[0] == "LIC":
identifier = node[1]
mapped = LATER_VERSION_PROFILES.get(identifier, identifier)
if mapped not in LICENSES:
raise ValueError(f"unmapped licence {identifier!r}")
if mapped != identifier:
return [replace(LICENSES[mapped], name=identifier)]
return [LICENSES[mapped]]
left, right = walk(node[1]), walk(node[2])
if node[0] == "OR":
if len(left) + len(right) > 64:
raise ValueError("too many alternatives")
return left + right
if len(left) * len(right) > 64:
raise ValueError("too many alternatives")
return [merge_and(a, b) for a in left for b in right]
try:
return min(
walk(tree), key=lambda profile: profile_rank(profile, purpose)
)
except (ValueError, RecursionError):
return Profile(name=expression, unknown=True)ConsoleOut [17]Expand
CC-BY-SA-4.0 -> CC BY-SA 4.0 nc=False sa=True attr=True unknown=False CC-BY-NC-4.0 OR CC-BY-4.0 -> CC BY 4.0 nc=False sa=False attr=True unknown=False MIT AND GPL-3.0-only -> MIT AND GPL-3.0 nc=False sa=False attr=True unknown=False GPL-3.0-or-later -> GPL-3.0-or-later nc=False sa=False attr=True unknown=False CC-BY-4.0 AND (CC0-1.0 OR CC-BY-NC-4.0) -> CC BY 4.0 AND CC0 1.0 nc=False sa=False attr=True unknown=False LicenseRef-mystery-terms -> LicenseRef-mystery-terms nc=False sa=False attr=False unknown=True
The profile display shows how AND combines flags and how the fixed score ranks known alternatives when no purpose is supplied. The resolver first ranks known alternatives by the fixture’s outcome for the requested purpose. For research, CC-BY-NC-4.0 OR CC-BY-ND-4.0 selects NC and allows with obligations. For commercial training, the same expression selects ND and sends the record to review. The toy ranking does not determine the legal scope of either branch.
Consent: creator-side signals
A creator’s preference, a licence from the rightsholder and consent required by a separate legal regime answer different questions.
A photographer may hold the copyright without the depicted person’s permission. A journalist can express a preference about training even after assigning copyright, while the assignment may leave the publisher with the authority to grant use. A forum contract may separately address what the platform can sublicense. Record both the preference and the instrument or authority behind it.
Record whether a rights grant is available for the act you plan. Record a creator’s training preference separately. Where applicable law requires consent for an activity, such as certain processing of personal data, verify that condition through the relevant legal and privacy review.
Registries and do-not-train lists
Spawning launched Have I Been Trained in 2022 and introduced an opt-out mechanism that December. The registry operator reported a commitment from Stability AI to respect registry opt-outs for Stable Diffusion 3 training.
This chapter's example policy can honour a registry preference as a data inclusion decision. Whether a listing also serves as an effective reservation requires a separate check of the applicable instrument, the person who made it, and the use it addresses.
- Granularity: some registries let creators identify particular works. Record the identifier, who asserted the preference, and whether it maps to the item in your corpus.
- Coverage: measure how many records and tokens your chosen registry matches. Source- or language-level counts can show where those matches change the mixture.
- Verification: check the authority behind the entry and whether it identifies the work, domain, or version you collected.
- Timing: record whether a listing was present at collection or surfaced later. Review the operational response against the existing data and model releases. We take up the mechanisms in Knowledge, Memory, Editing, and Unlearning.
Keep the preference, its verification status, and the decision that followed as separate fields. An unmatched record tells you about the limits of your lookup, so retain the registry version and date of the check.
Content credentials and signed provenance
A C2PA credential carries a signed claim bound to an asset. A validator can check the signature and asset binding under its trust configuration. That verification leaves the rightsholder's identity and any authority to permit training open. Version 1.x defined a native Training & Data Mining assertion. Version 2.0 removed it. If another field carries a preference, record the schema, its issuer, and the exact claim before deciding what it means for the use.
Check for the credential on the collected asset and record where you found it. Some manifests are embedded and can be lost when you re-encode the asset or extract text. Keep the original verification record and record failed or missing lookups so that later reviewers can tell what the parser actually saw.
Negotiated and collective licensing
Public announcements give examples of negotiated access. OpenAI announced partnerships with the Associated Press, Axel Springer, Le Monde, the Financial Times and News Corp. The announced terms vary. News Corp described access to current and archived articles and permission to display content. Reddit announced access to its Data API. Stack Overflow described API access and work to improve its models. For a training inventory, record the agreement and the uses its actual terms cover.
This changes the provenance schema. Licensed inventory arrives with a contract identifier, a scope, an expiry, and often a warranty and indemnity. Your document record needs a contract_ref field and a notion of scope that a license_expr alone cannot express. It also changes the politics: a world in which the highest-value text is exclusively licensed is a world in which the open crawl is the low-value remainder, which has downstream quality implications we discussed in Data Mixing.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!