Risk Categories

A taxonomy of trained ML model types, the privacy risks each is prone to, and the mitigation strategies available — a counterpart to the "statbarns" taxonomy used for traditional statistical disclosure control.

Partner logos
Overview

Why categorise models by risk

TREs are seeing growing demand for AI/ML projects that need to export a trained model built on sensitive data. Which privacy risks apply depends heavily on the type of technique used — so this taxonomy groups trained ML models by the nature of their predictions, with each group carrying its own set of risks and mitigations.

How to use this page

Work out which category best matches the model being proposed, then read that category's risks and mitigations in full — the summary table is a quick reference, but decisions shouldn't be made from the table alone.

Researchers should be ready to explain how the model is created and what it predicts, so TRE staff can identify the right category and apply the appropriate checks.

Important

If a model is never egressed from the TRE, there is no risk of privacy leakage from the model itself — this guidance does not apply in that case.

Assumptions

What this guidance assumes

These recommendations sit on top of a TRE's normal statistical disclosure control and mitigation practices — they don't replace them.

Data is pseudo-anonymised through existing processes before TRE users can access the dataset.

Every project's outputs undergo output checking prior to release — the exact process may vary between TREs.

All TRE users complete mandatory training.

Section 3

Types of risk considered

Eight recurring risk types show up across the model categories below. Some map directly onto risks already familiar from traditional statistical disclosure control; others — the "privacy attacks" — are specific to trained ML models.

1Extraction of explicitly stored data▸

Some models ("lazy learners" / instance-based models) work by retaining a carefully selected slice of the training data in order to make predictions. An attacker can directly extract some of that training data from the egressed model. The only mitigation is one the TRE would already be content with: releasing the (pre-processed) training data itself — e.g. because pre-processing makes it effectively k-anonymous, or applies a Differentially Private transformation with an agreed privacy parameter (ε).

2Small-group reporting▸

An individual belonging to a specific group or category where only a few people are present can be easily identifiable — especially if some characteristics of the group are already public. For example, patients at a specific NHS board who suffer from a rare genetic disease.

3Class disclosure▸

Information about a distinct population group is revealed, often inadvertently — for instance, when either none or all of the observations in a given category come from that subpopulation.

4Low residual degrees of freedom▸

A "saturated" regression model — one that considers every combination of variables — essentially becomes a complex look-up function. The usual test is whether the residual degrees of freedom (training records minus trainable parameters) stays above a threshold, typically 10.

5Membership Inference Attack (MIA)▸

Aims to determine whether a specific person's record was part of the dataset used to train the model.

6Attribute Inference Attack (AIA)▸

Usually applied to a known member: given some information already known about a person's record, this attack tries to recover the rest of that record's attributes. Some information about certain people — e.g. those in the public eye — may already be publicly available.

7Model inversion▸

Aims to recover a subset or group of records that share something in common (belong to a specific sub-class) — disclosing records belonging to several people at once. For example, everyone with a particular rare disease represented in the training data.

8Jailbreaking (regurgitation of implicitly stored data)▸

Sometimes a model can reproduce part of its training data precisely, even though it was never explicitly stored — because the model memorised the pattern so thoroughly it can reconstruct it on demand.

Section 4

How models are grouped

This guide focuses on supervised learning. Training iteratively presents data to the model, compares its predictions with the true values, and adjusts the model's parameters — categories here are defined by what the model does when a prediction is made, not by the learning algorithm's name.

Supervised Machine Learning — predictions are:
Category A
Comparisons to stored data
Instance-based learners · k-Nearest Neighbours · Support Vector Machines
Category B
Next values in a sequence
Recurrent Neural Nets · Transformer models · Foundation models
Independent of other training items
Outputs are:
Category C1
Numerical values — Regression
DecisionTreeRegressor, etc.
Category C2
Category values — Classification
RandomForest, XGBoost, MLP classifiers
Category C3
Semi-structured outputs
e.g. segmented images — CNNs, GANs
Summary heat-map

Risk profile by category

A quick-reference view only — always read the full category text below before making a decision.

Low risk Medium risk High risk

Category Explicit
extraction
Small-group
reporting
Class
disclosure
Low
DoF
Membership
Inference
Attribute
Inference
Model
Inversion
Jail-
breaking
Compute
cost
AStored-data comparison ↑
BSequence-based / LLMs ↑↑↑↑↑↑↑
C1Regression ↑↑
C2Classification ↑↑
C3Semi-structured outputs ↑↑↑
Category A

Predictions by comparison to stored data

Models that make predictions by directly comparing a new input to data retained from training.

Extremely high risk

By their nature, Category A models are vulnerable to extraction of explicitly stored data — regardless of whether they're predicting numbers (regression) or class labels (classification).

Includes

Instance-based / "lazy learner" models — simple, still widely used. A new prediction relies on proximity to data explicitly stored or embedded in the model. The classic example, 1-Nearest Neighbour, essentially asks "what's the label on the closest thing I've seen before?"

k-Nearest Neighbours (KNN) Case-based reasoning (CBR) Self-Organising Maps (SOM) Learning Vector Quantization (LVQ) Locally Weighted Learning (LWL)

Kernel models — transform input records into a space defined by stored "kernels" (usually themselves defined via stored training examples), where the prediction task becomes easier.

Radial Basis Function Networks (RBFN) Support Vector Machines (classifiers & regressors)
Risks
Mitigations

The only real mitigation is pre-processing the input data so thoroughly that the TRE would be comfortable releasing it directly — for example, transforming it into a synthetic dataset via a Differentially Private embedding. This requires extensive documentation of the pre-processing pipeline and/or the processed dataset itself.

Note

This mitigation does not, on its own, address class disclosure, small-group reporting or attribute inference — those must still be checked once the primary mitigation has been authorised, but it's not worth checking them beforehand.

Category B

Models trained on sequence-based tasks

Generative AI, foundation models, LLMs and vision transformers — models trained on sequences of tokens (words, image patches, video frames, genotype base-pairs, etc).

High risk

These models frequently implicitly contain embedded data that is hard to test for, because they typically:

  • have millions or trillions of trainable parameters — enough capacity to memorise, rather than generalise from, unusual training data;
  • use complex architectures that can represent, and be triggered by, specific sequences;
  • are trained on token sequences, where the output space suffers combinatorial explosion — so the models are typically sparse.
Generative AI Foundation models Large Language Models Vision-based Transformers Encoder-decoder models RNN / LSTM (less common now)
Considerations at project inception

Foundation models are pre-trained on a task that needs no manual labels (predicting the next token, or removing noise from an image), learning a re-usable embedding. It's vital to be clear from the start which scenario applies:

Scenario 1Lower risk

Import a pre-trained model, add a new "head", and train only the head — the rest of the foundation model is frozen. Only the head needs to be exported and risk-assessed; it can be treated as a simple regression or classification model. It helps to ask researchers to separate their code into a preprocessing function (the unchanged "body") and a prediction function (the "head").

Scenario 2High risk

Import a pre-trained model, add a new head, then adapt both the head and the body's weights. Both parts could now be memorising training data, so the full model needs assessing.

Scenario 3High risk

Train a foundation model from scratch and export it. The full model needs assessing, and it is highly unlikely to be feasible to run shadow-model Membership Inference testing given the scale involved.

Risks

It's often unclear what data a foundation model was pre-trained on — including dataset bias, copyright and licensing questions the TRE must resolve before hosting it. Because these models are deep neural networks, they are highly likely to contain some of their pre-training data internally.

For Scenarios 2 and 3, small-group reporting and class disclosure can usually be measured without retraining. Membership Inference testing requires training several "shadow" models of similar complexity on slightly different datasets — feasibility depends entirely on how long the original model took to train: it may be possible for Scenario 2 depending on data size and epochs, but is highly unlikely for Scenario 3.

Regulatory note

A recent US NIH directive states that generative AI trained or fine-tuned on confidential data should be treated as a data derivative and not released. In line with this, for Scenarios 2 and 3 the current recommendation is mitigation via model query controls — i.e. not releasing the model itself — rather than attempting full disclosure testing.

Category C

Predictions made independently for each input

A generally lower-risk group — data isn't explicitly stored — though in some circumstances specific groups of records can still leak. Sub-grouped by output type: numerical (regression), class probabilities (classification), or semi-structured.

Category C1

Regression models

Predict a continuous numeric value rather than a probability — how much or how long, rather than how likely.

Lower risk, context-dependent

Examples across domains: estimating air pollutant levels, predicting reoffending risk, forecasting hospital stay duration, analysing drug response. Risks and mitigations broadly mirror well-established linear/logistic/logit regression practice.

Includes
Simple & multiple linear regression Polynomial regression LASSO / ridge regression ARIMA family DecisionTreeRegressor / RandomForestRegressor / XGBoostRegressor Neural nets with linear output activation (e.g. MLPRegressor)
Risks

The principal risk is a model specified so completely that part of it effectively describes a small group of records — manifesting as low residual degrees of freedom. Where a model implicitly or explicitly performs piece-wise regression, check each sub-group's size (are some output values only predicted for a handful of training records?). Class disclosure risk mainly arises when a model predicts levels of two or more variables.

Mitigations
  • Structural attack checks — cheap to run, as no retraining is required. These already check residual degrees of freedom, class disclosure and k-anonymity for classification models; adapting them for regression needs only small extra work.
  • Model query controls — may be appropriate for very large regression models predicting multiple variables.
Category C2

Classification models

Assign an input to one of a predefined set of two or more categories — often with a probability attached to each option.

Lower risk, context-dependent

Examples: spam filtering, vehicle-type recognition, election-voting prediction, or linking genetic/health records to disease diagnoses. Includes simple approaches like logistic regression, but classification can be produced by almost any supervised ML algorithm.

Note

KNN and SVMs can technically produce classifiers, but because they embed training data they are treated under Category A for disclosure control purposes, not here.

Risks

Because many classification models partition the input space and report class probabilities within each partition, they're little different from human-designed groupings such as tables — so small-group reporting and class disclosure apply, and can be checked with tools such as sacroml.attack.StructuralAttack().

Unlike humans (who tend to use round-number groupings, e.g. age bands of 10-19, 20-29), ML-driven partitions are shaped by the data itself, and so can reflect individual records — making even simple classifiers potentially vulnerable to membership inference, attribute inference (for known members), and model inversion.

Mitigations

This is an active research area. The current best practice is to use a tool such as sacroml to run a series of "worst-case scenario" attacks and estimate an upper bound on vulnerability.

Category C3

Models producing semi-structured outputs

Outputs more flexible than a fixed table but more organised than free text — lists, key-value pairs, JSON, ranked lists, label sequences, or probability distributions.

Lower risk, context-dependent

Examples: labelling specific regions of an image, or extracting names and dates from documents — output that is machine-readable and can reveal hidden patterns or relationships without predefined categories. Often used as an input to other, more structured ML (e.g. descriptors of a segmented "region of interest" feeding into vision-based quality control or medical diagnosis).

Includes
Convolutional Neural Networks (e.g. U-Net)
Risks

Regions of interest may relate to only one record, or to records from a specific group of people — so the learned "feature detectors" may in fact be memorising aspects of individual records.

Mitigations

For most of these risks, the best mitigation is to run and report adversarial attacks that attempt to replicate what a real adversary might do.

References

Source & further reading

This page summarises "Types of risks and possible mitigations associated with different categories of machine learning models" (Smith & Crespi Boixader, v0.3, Sep 2025) — a counterpart to the statbarns taxonomy for traditional TRE outputs.

  • Jefferson E, Liley J, Malone M, et al. GRAIMATTER Green Paper: Recommendations for disclosure control of trained Machine Learning (ML) models from Trusted Research Environments (TREs). Zenodo, 2022.
  • J.E. Smith, M. Albashir, S. Bacon, et al. Semi-Automated Checking of Research Outputs (SACRO). Zenodo, 2023.
  • Green E, Ritchie F, White P. The statbarn: A New Model for Output Statistical Disclosure Control. Privacy in Statistical Databases, 2024, pp. 284–293.
  • Schneider J, Meske C, Kuss P. Foundation Models. Bus Inf Syst Eng 66, 221–231 (2024).
  • Sun K, Roy A, Tobin JM. Artificial intelligence and machine learning: Definition of terms and current concepts in critical care research. J Crit Care, 2024.
  • Bandi A, Adapa PVSR, Kuchi YEVPK. The Power of Generative AI: A Review of Requirements, Models, Input–Output Formats, Evaluation Metrics, and Challenges. Future Internet 15(8), 2023.
  • Wui H, Yao C. Membership Inference Attacks on Large-Scale Models: A Survey. arXiv preprint.
↑ Back to top