Concepts / Model Training Data Extraction

Model Training Data Extraction

Model training data extraction is the process of pulling the data used to train a model back out of that model or its training material.

  • Programming

A Question Asked of a Trained Model

A machine learning model is built from examples. Before it can do anything useful, it has to be fed a large collection of data, and the patterns it absorbs from that collection are what make it work. Because the model is shaped by its data, a security question follows naturally: could someone pull the original data back out of the model, or out of the material used to train it? That act is called model training data extraction.

Keep one question in mind as you read this article: when the data is extracted, what exactly has been lost, and to whom does it matter? The answer to that question determines which harm you are dealing with.

What Extraction Means

Definition

Model training data extraction is the process of pulling the data used to train a model back out of that model or its training material.

The definition has two possible sources for the extracted data. It can come out of the model itself, which holds patterns learned from the data, or out of the training material, which is the collection the model was built from. In both cases the goal of the extraction is the same: recover data that was used for training and move it somewhere it was not meant to go.

Tracing Data from Dataset to Outsider

The easiest way to understand extraction is to follow the data along a path. The dataset is the starting point, and the model is built from it. Training is the step that turns the dataset into learned patterns. The extraction step is the point where data leaves the protected path. The final stop is where the harm lands, and there are two possible destinations: a competitor, or a person whose information was in the data.

Datasetprivate and valuablerecordsTrainingturns examples intopatternsModelholds learned patternsExtractiondata leaves protected pathCompetitorreceives valuable dataAffected personreceives own privateinformationfeedsproducespulled outif valuableif private
At which stages can training data move out of its original source, and who can receive it at each stage?

Read the diagram from left to right. Nothing in the path is harmful by itself: the dataset is supposed to feed training, and the model is supposed to hold what it learned. The harm begins at the extraction step, where the data crosses out of the protected path. Which destination the data reaches determines which concern applies. A competitor receiving valuable data is one concern; a person receiving or being exposed through private information about themselves is another.

Two Harms From One Act

Querying a Model for Memorized Records

Consider the interaction between an outside party and a trained model. The outside party sends inputs and receives outputs. The security question is whether those outputs can contain records that were in the training set. The sequence below is a generated illustration of that interaction; it shows the ordering of messages, not a specific technique for extraction.

Outside partyTrained modelbuilt from training dataquery 1output 1query 2output 2
What sequence of steps does an outside party take to query a model, and what comes back?

Notice what the diagram does not show. It does not show that any output contains training records. Sending queries and receiving outputs is ordinary use of a model. Extraction is only established if what comes back is recognized as data that was used for training. The sequence describes the setting in which the question arises, and the source's framing makes clear that the question is whether original data could be pulled back out.

Possible Risk Versus Certain Harm

An extraction risk is possible as soon as private or valuable data is part of a model's training. A harm is certain only when extraction has actually happened and the consequences have landed on someone. The diagram below traces the progression from one state to the other.

Protected trainingdataprivate or valuableExtraction possiblerisk existsData extracteddata leaves protected pathHarm confirmedtheft or privacy violationtraining uses itextraction occurssomeone is affected
Where does a possible extraction risk end and a confirmed harm begin, and what conditions separate them?

Mistakes Beginners Make

  • Common mistake

    Treating data theft and privacy violation as the same harm

    What it looks like

    Assuming that any extraction is just a question of who owns the model

    Why it fails

    The two harms concern different things: the value of the data versus the private information in it

    Do this instead

    Ask separately what was taken and who is affected

  • Common mistake

    Believing that a harm only exists after a leak has been confirmed

    Why it fails

    The source states that private or valuable data justifies protection before any extraction happens

    Do this instead

    Treat the presence of such data in training as a reason to protect it now

  • Common mistake

    Assuming a single extraction can only produce one kind of harm

    Why it fails

    If the extracted data is both valuable and private, the same act counts as both data theft and privacy violation

    Do this instead

    Check each concern on its own, then consider whether both apply

  • Common mistake

    Confusing the training dataset with the model, when both can be sources of extracted data

Classifying Extraction Scenarios

MEDIUM

A company trains a model on internal sales records that competitors would value. Before any extraction occurs, a colleague says there is no harm yet, so no protection is needed. Using the two questions from this article, explain which harm is possible, which harm is certain, and why the colleague's conclusion is incomplete.

Hints
  • Start by asking what the training data contains and whether a competitor would value it
  • Remember that possible risk and certain harm are different states
  • The source says protection is justified by the presence of valuable data, before extraction

Key Takeaways

  • Model training data extraction is pulling the data used to train a model back out of that model or its training material.
  • Data theft concerns the value of extracted data, while privacy violation concerns extracted private and sensitive information; both can come from the same extraction.
  • Training data can leave its protected path at the extraction step, and the destination, a competitor or an affected person, determines which harm applies.
  • Private or valuable training data is a possible risk that justifies protection before extraction; a harm is certain only once extraction has happened and affected someone.

Related concepts

More concepts starting with M