Short answer
The two DSM exceptions give different answers, and the difference is one of the most practically important distinctions in the whole framework.
Article 3 — research organisations and cultural heritage institutions:
"Copies of works or other subject matter made in compliance with paragraph 1 shall be stored with an appropriate level of security and may be retained for the purposes of scientific research, including for the verification of research results." —
No time limit. Retention is permitted for scientific research purposes, expressly including verification of results — which contemplates keeping copies indefinitely so that research can be reproduced.
Article 4 — everyone else, including commercial AI developers:
"Reproductions and extractions made pursuant to paragraph 1 may be retained for as long as is necessary for the purposes of text and data mining." —
Purpose-limited, not open-ended. Retention is lawful only while it remains necessary for the mining.
Neither provision sets a number of months or years. Both set a standard, and a commercial developer must be able to articulate why the copies are still needed.
Why Article 3 is more generous
The research exception is built for reproducibility. Science that cannot be checked is not much use, and verification requires the underlying corpus.
Two balancing obligations come with it.
Security. Copies must be "stored with an appropriate level of security". This is an obligation on the beneficiary, not merely good practice.
Rightholder measures. Article 3(3) permits rightholders to apply measures to ensure the security and integrity of the networks and databases hosting the material, but "such measures shall not go beyond what is necessary to achieve that objective". Article 3(4) encourages commonly agreed best practices on both points.
Article 3 also has two features Article 4 lacks: there is no opt-out, and Article 7(1) makes any contractual provision contrary to it unenforceable.
But the exception is tied to the beneficiary and the purpose. Article 2(1) defines research organisations narrowly — not-for-profit, or reinvesting profits in research, or acting under a recognised public-interest mission — and excludes bodies where an undertaking exercising decisive influence enjoys preferential access to the results. A commercial developer cannot simply adopt the Article 3 retention standard.
What "as long as is necessary" means in practice
Article 4(2) gives no fixed period, so a developer must justify continued retention by reference to the mining purpose.
Reasonably defensible grounds for continued retention:
- Ongoing and iterative training. A corpus retained to train successive model versions is still being used for TDM.
- Validation and evaluation. Holding data to test model performance is part of the analytical process.
- Reproducibility and debugging. Investigating model behaviour may require the training corpus.
- Regulatory documentation. The AI Act requires technical documentation under Article 53(1)(a) and Annex XI, and a training-content summary under Article 53(1)(d). Article 54(3)(b) requires an authorised representative to keep Annex XI documentation available for ten years. That supports retaining records about the data.
Harder to justify:
- Retention after the mining purpose has concluded, with no further use planned.
- Retention as a general-purpose archive unconnected to any analytical use.
- Retention for redistribution or licensing, which is not mining at all.
The distinction worth holding onto is between the corpus and the records. The AI Act's documentation obligations are satisfied by records describing sources, licences and processing — not necessarily by keeping full copies of every work. Where the corpus itself is no longer needed for mining, Article 4(2) does not authorise keeping it merely because a regulator might ask questions.
This is an area where the law has not been tested and reasonable views differ. Document the justification contemporaneously rather than reconstructing it later.
The reservation can end the permission
Article 4(3) makes the whole exception conditional on the absence of an express reservation by the rightholder, in an appropriate manner such as machine-readable means for content made publicly available online.
Two consequences for retention.
If material was already subject to a reservation when copied, Article 4 never applied, and Article 4(2) provides no retention basis at all.
If a reservation is expressed after the copies were made, the position is genuinely unsettled. A defensible approach is to treat the reservation as preventing further mining of that material going forward and to remove it from active corpora, rather than to assume retention remains covered because the original copying was lawful.
Given the AI Act Article 53(1)(c) duty to identify and comply with reservations "including through state-of-the-art technologies", a provider that detects a new reservation and does nothing is exposed on the regulatory side even if the copyright position is arguable.
The three-step test applies
Article 7(2) applies Article 5(5) of the InfoSoc Directive to the DSM exceptions — the three-step test: exceptions apply only in certain special cases which do not conflict with a normal exploitation of the work and do not unreasonably prejudice the legitimate interests of the rightholder.
That matters for retention. A retained corpus held in a way that substitutes for licensing the underlying works, or that could be used as a distribution channel, is likelier to conflict with normal exploitation than one held securely for internal analytical use.
Security is therefore not just an Article 3 obligation. For Article 4 beneficiaries it is part of showing that retention does not unreasonably prejudice rightholders.
Other retention rules that apply simultaneously
Personal data. Where the corpus contains personal data, GDPR Article 5(1)(e) storage limitation applies independently. A copyright exception permitting retention is not a data-protection basis for it, and the two analyses must be run separately.
Database rights. Article 4(1) extends to Article 7(1) of the Database Directive, so extractions from protected databases are within the exception — and within the same retention limit. Article 7(5) of that Directive separately prohibits repeated and systematic extraction of insubstantial parts conflicting with normal exploitation.
Contract. Unlike Article 3, the Article 4 exception is not protected against contractual override. Licence terms and access conditions may impose shorter retention limits, and those bind as a matter of contract.
Temporary copies. InfoSoc Article 5(1) provides a separate exception for transient or incidental temporary acts of reproduction that are an integral and essential part of a technological process. It is much narrower and cannot support a retained corpus.
Practical guidance
- Establish which exception you rely on. Article 3 is not available to commercial developers.
- Under Article 4, define and record the mining purpose, and review retention against it.
- Separate the training corpus from documentation records; different justifications apply.
- Apply appropriate security to retained copies regardless of which exception applies.
- Monitor for reservations continuously and remove reserved material from active corpora.
- Do not assume AI Act documentation duties justify keeping the full corpus.
- Run the GDPR storage-limitation analysis separately.
- Check licence and access terms for contractual retention limits.
- Schedule periodic reviews and record the outcome, including decisions to keep.
Conclusion
Article 3 permits open-ended retention for scientific research, including verification of results, with a security obligation attached. Article 4 permits retention only for as long as necessary for the mining itself.
For a commercial AI developer, that means retention is defensible while the corpus is genuinely in use for training, validation or investigation of model behaviour — and becomes harder to defend once it is simply being kept. The safest posture is to distinguish the corpus from the records about it, secure what is retained, monitor for reservations, and be able to state, at any point, why the material is still necessary for text and data mining.
Sources
This article provides general legal information, not advice for a specific matter. Laws, facts and procedural deadlines may change the result. Follow the linked primary sources and obtain local advice before acting.