Skip to content
Book a conversation

Data leakage between datasets

Contamination of evaluation by information or examples crossing boundaries defined by the evaluation procedure.

Luiz GardelinUpdated Read in Markdown
All terms

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation
On this pageIntroduction

Also used as: train-test leakage, dataset contamination.

Data leakage between datasets is contamination of an evaluation when information or examples cross a boundary intended to preserve it. One concrete case presented by Google is finding copies of training examples in the test set. Performance may appear better because part of the evaluation repeats material that participated in learning, rather than examining only examples new to that stage. Source: Google.

Here, leakage does not necessarily mean disclosure of confidential information. It concerns the validity of evaluation. Unauthorized disclosure concerns improper access or exposure and requires a different analysis. A dataset can remain under access control while containing duplicates that undermine the test. Conversely, a duplicate-free test does not establish that every possible dependency between data has been resolved.

Separate files are insufficient

Google's lesson recommends removing from validation and test sets examples duplicated from the training set. It also describes another concern: repeatedly using a set's results to select configurations can adapt development to that set's particular features. Interpreting an evaluation therefore requires examining both data composition and how results informed decisions. Source: Google.

As an organizational procedure, preserve original record identities and document dataset selection. When duplication is detected, investigate its origin and its impact on conclusions already reported. Renaming a file or removing a row without recording the change is insufficient. Other relationships between examples need examination according to the project's particular design; do not assume that one check covers every form of leakage. The report should make clear what was investigated and which dependencies remain unresolved.

Hypothetical example

A team separates messages for training and testing a classifier. It later notices that exports from two departments contain the same request under different identifiers. Copies ended up in both groups. The team revises record assignment, repeats evaluation under corrected conditions and identifies earlier comparisons that relied on the contaminated split. No message left the organization; the problem was presenting repetition as evidence of performance on new material.

Sources

  1. Datasets: Dividing the original dataset Google for Developers

    The lesson presents a training, validation and test split and discusses duplicates and repeated use of datasets.

Written by

Luiz Gardelin

Founder and lead consultant at The Company Brain

Luiz Gardelin is the founder and lead consultant at The Company Brain, an AI organizational transformation consultancy based in Brazil. He also founded Webinhood and Tropk.ai.

See all content by this author

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation

Related terms

Continue reading

All resources