Neural networks memorise personal information from one sample

Deep neural networks (DNNs) have achieved high accuracy in diagnosing multiple diseases/conditions at a large scale. However, a number of concerns have been raised about safeguarding data privacy and algorithmic bias of the neural network models. We demonstrate that unique features (UFs), such as names, IDs, or other patient information can be memorised (and eventually leaked) by neural networks even when it occurs on a single training data sample within the dataset. We explain this memorisation phenomenon by showing that it is more likely to occur when UFs are an instance of a rare concept. We propose methods to identify whether a given model does or does not memorise a given (known) feature. Importantly, our method does not require access to the training data and therefore can be deployed by an external entity. We conclude that memorisation does have implications on model robustness, but it can also pose a risk to the privacy of patients who consent to the use of their data for training models.

The objective of a deep neural network (DNN) is to learn the fundamental underlying relationships between the inputs and target outputs of a training dataset, such that the network generalises to give desired outputs when presented with novel unseen data inputs.However, DNNs have been shown to frequently assign predictions based only on a single example in their training data [1][2][3][4] .Such learning type is also referred to memorisation.
This study focuses on unique feature memorisation (UFM) and how UFM relates to model robustness and consequently to the privacy of individuals when training neural networks.UFM is the unintended memorisation of specific features that occur once in training data as opposed to memorisation of examples or training labels.
Whilst training examples have been shown to be memorised 1 , it is not clear whether an example is memorised in its entirety or a specific feature of the example (e.g. the image) is memorised.
Let us consider a medical imaging example where data are sensitive 5,6 , a private feature such as a person's or healthcare professional's name (a unique and unusual feature) has survived sanitisation processes 7 and is displayed on a single image (and hence it is very rare).Our hypothesis is that a classifier trained on data containing patient or healthcare professionals names may memorise this private feature.This has two consequences.First, there is an obvious privacy risk: the model has potentially learned this unique (and private) feature and has retained this information within its parameters.Thus, it is possible that such information can be leaked.An adversary with access to the weights of a trained neural network could potentially use them to infer information about the training examples.
Second, this classifier might misdiagnose other patients if this feature appears in another patient's medical scan, as illustrated in Fig. 1.The unintended presence of UF may lead to incomplete extraction of the correct discriminative features from the image 8 .Such a risk is similar to decision-making based on spurious correlations or shortcuts [9][10][11][12] , except that only a single spurious feature is present in the dataset.
In this article, we evaluate whether neural networks memorise unique features and show how to measure it.We conducted experiments to demonstrate why this phenomenon happens, and discuss its consequences for privacy.

Methods
In the following section, we define the essential concepts for studying UFM, propose a way of measuring it with the M score and describe a series of experiments that enhance understanding of UFM and when it happens.
1. we do have access to the unique feature and training data but do not have access to the unique feature label and the model weights, which we call the "grey box" setting; 2. we additionally remove access to the training data, i.e. the "black box" setting, where we only have access to unique feature.The "black box" setting is more realistic since models are routinely exposed behind application interfaces or are made publicly available, whereas their training data are not.
See illustration of these settings in Fig. 2.

M score
M score is a simple method to measure the memorisation of unique features in neural networks.We demonstrate our approach in three settings of increasing difficulty and realism from an attacker's perspective, i.e. different privacy settings.

White box
We introduce the M-score for measuring unique feature memorisation in a setting where we have access to the training data, D t , and the unique feature label y u .Let D yu be a subset of the training data with the same label y u as the unique feature.The score is given by where x u , x c represent the same data sample x with label y, either injected with a unique feature ( x u ) or left intact ( x c ; with c denoting this 'clean' datum).Intuitively M is the average difference in the label likelihoods between inferences on the {x u , x c } image pairs.This makes the scale of our M score particularly straightforward to interpret.
A similar score was used to measure rare spurious correlations 13 .However, instead of averaging over the training data, M is the fraction of samples with M < ǫ .In practice, we do not find outliers which distort our average score since we scale our model outputs using a softmax function.In addition, our results show that M has a greater sensitivity to unique features which occur only once in the training data set.M runs from -1 to 1. Values of M larger than zero correspond to increasing memorisation since the signal from the unique feature is greater than the images without the unique feature.

Grey box
In the grey box setting we remove the assumption that we know the unique feature label y.In practice this means we know some information, e.g. a patient's name, but we do not know the patient's pathology.In the grey box setting we propose that we can infer y from the score from M white score M i over each possible label y i and the final M grey will be the maximum M white across labels.The M-score in the grey setting can therefore be written as

Black box
We now develop a memorisation score M for practical settings where disclosure agreements prevent us from having access to the training dataset or its distribution.In the black box setting we remove the assumption that we have access to the training data, D t .This is the most restrictive setting and represents the case where an attacker has obtained a neural network model and knowledge of the unique feature's style.In this setting we simply use another randomly selected dataset D r .In practice the data distribution does not appear to influence the results and therefore any data set can be used.

Statistical significance
We statistically test every M score result in our experiments.We construct two samples from inferences on the test data X u = {P(y|x i u )} n i=0 and X c = {P(y|x i c )} n i=0 .We quantify the statistical significance ( p < 0.05 ) of the M score using a one-tailed t-test with an alternative hypothesis that the population mean of x u is greater than x c .We consider that a NN memorised a unique feature when the alternative hypothesis is true.

Metrics
To mitigate stochasticity in measuring memorisation, we run training of neural networks for multiple seeds, all else remaining the same.In some experiments, we run up to 1000 different seeds.We only consider the statistically significant higher M score as memorised networks.To report these results over many seeds, we use the proportion of memorised networks, average M score, maximum M score.

Datasets and unique features
We measure memorisation in several datasets containing a single unique feature (artificially introduced).For imaging datasets, we use F-MNIST 14 , CIFAR-10 15 , Celeb-A 16 , and CheXpert 17 .Celeb-A has multiple labels.We found that many classification tasks were very easy to solve, and the networks found easy shortcuts.Therefore, we choose a binary classification task of attractive/non-attractive whose discriminative features are less welldefined.These datasets span several image sizes, dataset size, contents and styles, and are fairly representative of the problem of image classification in computer vision.We use "two moons" 18 as a generic low-dimensional dataset in order to characterise and explain UFM in general.In our "two moons" setting, all the classification-related information is present in the x-and y-axes.The z dimension would correspond to a new concept.We consider the z-axis to be an uninformative additional dimension to which the unique feature may be introduced.
We increase the generality of our results by using several unique features.For the datasets F-MNIST, CIFAR-10, and Celeb-A we use a 5 × 5 image patch of the letter ' A' two pixels from the upper-left corner of the training image as shown in Fig. 2. For the CheXpert dataset we use a fictitious patient name 'JOHN' .Our two-moons experiment is instead simpler: the unique feature is a single value in the 3rd (z-axis) direction.

Models and training strategies
We evaluate our memorisation score using several common architectural styles of neural networks summarised in Table 1.
MLP-1 is trained on MNIST and F-MNIST datasets.We train MLP-1 with a learning rate of 3 × 10 −4 and a batch size of 128 samples.We train MLP-2 on the two moons datasets.CNN-1 a simple 2-layer convolutional neural network trained with a batch size of 128 samples.We perform image classification on CIFAR-10 and Celeb-A using ResNet18 19 .This model is formulated specifically for small images 32 × 32 pixels.We train with a learning rate of 1e-5 and a batch size of 32 samples.We use 5 patient epochs and train for a maximum of 100 epochs.To classify CheXpert images, we use DenseNet121 20 .We use the same hyperparameters as in the original work 17 and train on only on chest X-rays orientated toward the front.
We aim to show that feature memorisation occurs before overfitting, therefore we train with early stopping and fine-tune the number of patient epochs by hand.After training, we select the final model weights from the epoch with the lowest validation loss.We train all models using the Adam optimiser and a cross-entropy loss function 21 .We use the PyTorch deep learning framework to train and evaluate models 22 and SciPy 23 to perform significance testing.We train models using a Nvidia ® Titan RTX™.We estimate the computation time for the experiments to be around 200 GPU hours.

Experimental setup
We proceed to propose a series of experiments to study UFM.

Evaluating unique feature memorisation
We measure UFM by evaluating how sensitive a trained DNN is to the insertion of a unique feature into a data sample.We hypothesise that if a DNN has memorised a unique feature, it will be more sensitive to images containing it.Any (statistically significant) increase in confidence after insertion of the unique feature must be due  www.nature.com/scientificreports/ to memorisation since the feature is unique and cannot be learnt from any other label in the training data.We measure the M score as a proxy of an increase in confidence for UFM.We consider a white box setting for this experiment.

Does regularisation prevent unique feature memorisation?
Regularisation strategies for training models are typically employed to reduce the ability of a model to overfit.These strategies aim to promote learning of features which generalise well to samples outside the training data.Since neural networks are historically assumed to learn common patterns first and memorise labels later during the training process 2,24 , it is expected that learning of unique features which do not occur in the test set will be reduced by training with regularisation methods.
In our experiments, we build on these works to understand how regularisation strategies affect unique feature memorisation in image classification models.Using common regularisation strategies (dropout 25 , data augmentation, weight decay 26 , and batch normalisation 27 ), we train each model with early stopping to eliminate overfitting on average across the dataset.We train two neural network models MLP-2 and CNN-1 over MNIST and F-MNIST over 10 random training and measure the maximum M score across runs.We consider a white box setting for this experiment.

UFM and training dynamics
We train 100 NNs over the toy "two moons" dataset with one data point containing a unique feature in the third dimension.We measure the proportion of memorised networks at each epoch and mean accuracy across runs.We consider a white box setting.

Rare concepts and UFM
It is a well-known fact that specific hidden units of NNs can be associated with concepts in the data 28 .We explore the interplay between how often features appear in the data and whether they do or do not introduce a rare concept.We hypothesise that the presence of a unique feature introduces a new latent dimension in the space where decisions are made.We train a MLP model on "two moons".In this setting, all the classification-related information is present in the x-and y-axes.The z dimension would correspond to a new concept.We consider the z-axis to be an uninformative additional dimension to which the unique feature may be introduced.We investigate if rarity in z-axis influences memorisation.We measure, in two settings, the proportion of memorised networks from training data containing a single data point with z = 1 : (i) z = 0 for all data samples except for one sample which has z = 1 , i.e. non-zero values in the z dimension are rare; (ii) we add Gaussian noise along the z-axis for samples in the training data while keeping the one data point with z = 1 .For each case, we train 500 NNs with different seeds, all else kept the same.We consider a white box setting.This toy setting allows us to disregard all questions related to the actual characteristics of the unique features (e.g. a letter "A" or "B" or an entire word "JOHN") since we are only dealing with scalars as opposed to image features.This setting emulates many real-world scenarios.For instance, a patient's name should not be informative about their diagnosis.Or, in most X-ray images, the edges would be black (representing a ubiquitous "background" concept) and do not contain any informative features for diagnosis.

M score and sensitivity to unique features.
We train a model with a single image containing a UF.At test time, we estimate the M score after progressively removing pixels from the unique feature, keeping all else the same.

UFM and risks in medical imaging
Memorisation of data samples poses a privacy risk to individuals whose data is used to train neural networks.This is because information relating to training samples is encoded directly in the weights of a neural network 29,30 .An adversary 31 could construct a readout function acting on the weights or network outputs to discover information about a given sample 32 .Data leakage is particularly problematic when datasets contain private information for which disclosure must be controlled.For example, DNNs used in healthcare may encode information about patients in their weights 9,10 , for which disclosure is legally restricted in the EU by the General Data Protection Regulation (GDPR).
Medical imaging offers a practical and realistic example of the risks posed by unique feature memorisation.Hospitals frequently employ sanitisation processes to remove patient names when they appear overlaid on X-ray films (see Fig. 1).There is a possibility that these processes may fail, resulting in the addition of personal private data to training data.Hence a properly designed readout function may indeed lead to the recovery of such private information from the model.
There is another risk with the inclusion of such unique features.A classifier trained on such data may misdiagnose other patients with the same name if those names have not also been removed during the sanitisation process.Alternatively, the unintended presence may lead to incomplete extraction of the correct discriminative features from the image 8 .Such a risk is similar to decision-making based on spurious correlations, except that only a single spurious feature is present in the dataset [9][10][11][12] .
We train a classifier on the CheXpert chest X-Ray dataset.We add a unique feature 'JOHN' to a single training image in the upper left corner, and overlay a black rectangle image of the same size over the other images.We generated explanations of the classification with a GradCAM heatmap for predictions made by the NN trained on our modified CheXpert dataset.
Vol:.( 1234567890 In all situations, we assume access to the unique feature and the output of the last layer of the NN.See illustration of these settings in Fig. 2. The "black box" setting is more realistic since models are routinely exposed behind application interfaces or are made publicly available, whereas their training data are not.Grey box setting.We remove access to the unique feature label for "grey box" M score.We train 10 models on F-MNIST dataset, each trained with a unique feature inserted into a different randomly selected training image from class 1.Then, we measure the "white box" M score and the "grey box" M score to verify if they are indeed correlated.For each model, we also indicate the predicted unique feature label ŷ in the "grey box" box setting.Next, we repeat this experiment for the Celeb-A dataset.
Black box setting.We remove access to the training dataset for "black box" M score.We train 10 models on Celeb-A and CIFAR-10 datasets, each trained with a unique feature inserted into a different randomly selected training image from class 1.Then, we measurethe "white box" M score and the "black box" M score.We evaluate the memorisation of the unique feature in CIFAR-10 and Celeb-A using Celeb-A and CIFAR-10 respectively at inference time.

Results
We now show empirical results demonstrating that 1. neural networks memorise unique features in several datasets for a range of model architectures; 2. memorisation of unique features cannot be prevented using typical regularisation strategies; 3. memorisation happens due to the presence of such a rare feature which is unusual and hence unique with respect to (they are unusual only once) features in concepts which are rare (unusual) in the data and it happens from the first epoch and over the entire unique feature; 4. we are able to audit models with the M score in a grey or black box setting (different settings are illustrated in Fig. 2).
We refer the reader to the Methods section for full details of the datasets, models, training schemes and memorisation scores.

Neural networks memorise unique features
Following the experiment described in section 2.5, Table 2 shows that UFM occurs frequently in a range of neural network architectures and benchmark datasets from simple to complex: a variation of the two moons dataset 18 (described in Fig. 3), F-MNIST 14 , CIFAR10 15 , CheXpert 17 , CelebA 16 .We conducted experiments using different training seeds and training stochasticity as shown in Table 2 (i.e.number of runs).Based on the proportion of memorised networks (where M is statistically significant with p < 0.05 ), it is noted that memorisation is not always present.Hence, different training seeds and training stochasticity lead to different memorisation results.We further visualise in Fig. 3b), for setting (i), the decision boundary in the x-y plane for z ∈ {0, 1} and the differences for networks that memorised the datapoint in z = 1 and networks that did not.The memorising networks have a stronger shift in the decision boundary in the z = 1 plane, which would correspond to hav- ing test images which contain unique features.This experiment illustrates how unique feature memorisation increases the risk of misclassification when the unique feature is present in the test data.Indeed, there are more misclassifications of samples which include the unique feature ( z = 1 plane) and those with representative x-y features of the opposite class.

Regularisation does not prevent unique feature memorisation
Results shown in Table 3 empirically demonstrate that regularisation does not significantly reduce the M score (UFM).This is in line with recent works showing that regularisation strategies do not eliminate memorisation in neural networks.For example, explicit regularisation does not prevent sample-based memorisation 1 or featurebased memorisation in language modelling 33,34 .More recently, it has been shown that the influence of rare spurious features could not be eliminated by either weight decay or by introducing Gaussian noise to training inputs 13 .

Memorisation happens early during training
Some networks memorise unique features from the first training epoch.We find that learning of unique features occurs early in training process, similarly to sample memorisation 35 and feature memorisation in language modelling 33,34 .Thus, it appears that UFM occurs even when the feature values in the sample are not overfitted.We depict in Fig. 4 an experiment with a toy dataset showing that memorisation happens in around 40% since the first epoch.We illustrate that, while the likelihood of memorisation increases with overfitting, memorisation happens from the beginning of training.

Rare concepts lead to unique feature memorisation
We found, as we illustrate in Fig. 3 a), that 82.6% of the networks memorised for setting (i) while only 41.4% did in (ii).This result indicates that a rare concept leads to memorisation even with the introduction of Gaussian noise.We show that memorisation is stronger when rarity in concept and in feature coincide, creating a unique feature (UF).

M score measures sensitivity to unique features
As described in section "M score and sensitivity to unique features", removing a single pixel from the unique feature changes the score significantly.This implies that the model has learned to capture the whole unique feature verbatim.It has not for example extracted representations that approximate the UF (e.g. its edges, corners etc).We find that unique features are captured by the M score in their entirety (see Fig. 5).

UFM poses a robustness and privacy risk to medical imaging
Based on the experiment detailed in section "UFM and risks in medical imaging", Fig. 8 shows GradCAM explanations for predictions on 'Consolidation' for three models trained with the unique feature on different images.The upper heatmaps clearly show that the private personal information feature explains the model's prediction, and that true explanatory features relating to the physiology of the patient are considerably less A study of neural network memorisation with the "two moon" toy dataset.All the classificationrelevant information is present along the x and y.We study situations when a data sample with a unique feature in the z (depicted with a triangle marker) dimension is memorised.(a) Top, is the case where the dataset has a unique feature on z-dimension.82.6% of NNs memorised the feature.Bottom, here noise is added along z, and now the concept is not unique.Indeed now, the proportion of NNs which memorised the unique feature is much smaller (41.4%).(b) We now explore how decision boundaries change whether a unique feature is memorised or not.The decision boundaries for z = 1 (i.e.data points with the unique feature) differ considerably between a network that memorised (bottom) and one that did not (top).www.nature.com/scientificreports/explanatory.However, when the unique feature is removed from the lower images, the explanations for the pathology surround physical features which are expected.The upper heatmaps clearly show that the private personal information feature explains the model's prediction, and that true explanatory features relating to the physiology of the patient are considerably less explanatory.However, when the unique feature is removed from the lower images, the explanations for the pathology surround physical features which are expected.This simulates the removal of private personal information and the counter-case of accidentally missing some unique private personal information.

Identifying memorisation in private settings
In the grey box setting, Fig. 7 shows the "white box", "grey box" and "black box" M scores are correlated on the Celeb-A dataset.In this context, white box setting is seen as the ground truth.In the black box setting, we observe that NNs are more sensitive to a data point after the insertion of the unique feature.Interestingly, the specific data distribution is not important, since our method finds only the relative distances between model outputs from image pair inputs."black box" M score is less accurate on models trained on the CIFAR-10 dataset, see Fig. 6.

Unique Feature Memorisation
We show that unique feature memorisation is not uncommon in classification neural networks for low-dimensional data and in a range of deep learning models for image classification.Also, we find that regularisation does not eliminate UFM, and that similarly to language modelling, singly occurring unique features are learnt early in training.A letter or name, for example, written on a natural image can often be memorised by DNNs trained using the backpropagation algorithm.We hypothesise and validate empirically that these features are more likely to be memorised when they appear in explored dimensions, as shown in Fig. 3. Typically, we would expect the learning algorithm to ignore the unique feature.This is because under the information bottleneck (IB) principle, information learnt from the other samples in the training dataset is sufficient to reduce the uncertainty of the label distribution 36,37 .However, in practice this does not seem to be the case.We suggest the following explanation for this behaviour.Let us assume that the classifier is extracting a latent space from the input data.We can theoretically partition the latents in two parts: those learned from the samples according to the IB principle and those attributed to the unique feature.Indeed our results in Fig. 3 hint at this.The decision boundary in 2D for samples without the unique feature ( z = 0 ) is the expected hyperplane, whereas the decision boundary is completely shifted for samples with the unique feature ( z = 1 ).Under the Principle of Least Effort 11 , the learning algorithm may shortcut over the unique feature since it is easy to learn, and as our results suggest it may do so early on in training (Fig. 3).We believe that studying learning dynamics (model behaviour during training) is a good way of understanding the memorisation phenomenon critically.Similarly, recent works show that shortcuts (a similar concept) are memorised in the beginning of training 38,39 and the connection between local minima in the loss landscape 39 .
Previous research has established that over-trained, over-parameterised deep neural networks are able to memorise randomised training labels, and randomised data samples 1 .As a result of this finding, a number of methods have been developed to measure label and sample memorisation 3,4,40,[40][41][42][43][44][45][46][47][48][49] .Early work on understanding memorisation suggested that neural networks learn patterns early in training and memorise random patterns later 2 .More recently, it has been shown that learning and sample memorisation occur simultaneously 35 .Few studies have investigated the memorisation of features.Recent works on the privacy risks of Large Language Models (LLMS) established that LLMs memorise features even when they rarely appear in training data 33,34 .Figure 6.Correlation between M score in "white box" and "black box" setting for the Cifar-10 dataset.We show that unique feature memorisation can be measured without access to the original training data or to the unique feature label.
Decision-making based on spurious correlations is a similar topic to feature memorisation [9][10][11][12][13] .Our investigation into unique feature memorisation follows naturally from these works.We distinguish ourselves by investigating feature memorisation in its most extreme form: where a unique feature occurs only once in training data.

Privacy and Unique Features
Unique features might contain personal information, which poses serious privacy concerns in certain settings such as decision-making in healthcare.We identify that models leak information about unique features that were memorised during training.More importantly, we show that we can audit if models memorised specific features in private settings, when the auditor does not have access to the training data nor to the unique feature label.
Other works propose privacy attacks which also exploit data leakage to uncover information about training data.We now detail some techniques from the literature and how our work differentiates, in particular 1. membership inference attacks deduce, whether a sample is in the training set by exploiting a model's overconfidence on examples it has seen 32,[50][51][52][53] .We focus on the memorisation of unique features and not whole data samples or datasets.

backdoor attacks attempt to adversarially change a model's predictions by injecting an optimised image patch
onto training examples such that when this patch occurs on an attack example at test time, the predictions of the model can be controlled 31,[54][55][56][57][58][59] .In contrast, we show that a unique feature which occurs in the training data is memorised.This feature is not optimised to modify the outputs of the model at test time.3. property inference attacks attempt to learn a group property/feature of the dataset.For example, what proportion of people in the training set wear glasses? 60,61.These attacks are typically white box and proceed by using a shadow model to make inferences on the target model weights.Feature memorisation, as we investigate here, can be viewed as an extreme property inference attack where a unique feature, a person who wears glasses, occurs only once in the dataset.Existing approaches, however, cannot address unique feature memorisation since labelling the training weights to train the shadow model requires ground-truth knowledge of whether the feature was memorised or not.

Guidelines and Best Practices
The findings of this study highlight the need to develop strategies to protect personal information when present as a unique feature.One of the possible ways to avoid the presence/influence of unique features is to develop automatic solutions to detect personal information printed on training images for removal before moving forward with machine learning training.Another suggestion for safeguarding is to develop a privacy filter (testing stage) that rejects/modifies an image with identifiable information printed on it so that an attacker will not be able to get access to identifiable information learned by neural networks.By doing that, a data scientist is lowering the possibility of linking a breached patient record (as happened in England (https:// www.bbc.co.uk/ news/ techn ology-44682 369)) to training data of their ML model.The findings will also inform policymakers to develop practices and guidelines for data scientists and companies to protect personal information for those situations according to policy document (https:// www.gov.uk/ gover nment/ publi catio ns/ ai-regul ation-a-pro-innov ationappro ach/ white-paper) by safeguarding against bad actors.

Figure 1 .
Figure 1.Unique image features, which may contain private information (e.g.name JOHN), unintentionally left in training data can be memorised by a neural network.They are unique because they are unusual with respect to the remaining features of the dataset and occur only once.We propose methods to identify if a feature has been memorised.As seen in the GradCAM heatmaps (right), memorised features have an unreasonably high influence in the neural network's decision.*Note the name JOHN in the figure is fictitious and it was artificially added to the images for visualisation purposes.Therefore, the name JOHN cannot be used re-identify the patient in the image.The x-ray images are from the publicly available Chexpert dataset.

Figure 2 .
Figure 2. Our method can identify memorisation across different data availability settings which we classify as (i) white box which assumes access to the training data; (ii) grey box which assumes access to the label of the unique feature; and (iii) black box where only the unique feature is needed to identify memorisation.The faces in the figure are from the publicly available dataset CelebA. https://doi.org/10.1038/s41598-023-48034-3 https://doi.org/10.1038/s41598-023-48034-3www.nature.com/scientificreports/

Figure 3 .
Figure 3.A study of neural network memorisation with the "two moon" toy dataset.All the classificationrelevant information is present along the x and y.We study situations when a data sample with a unique feature in the z (depicted with a triangle marker) dimension is memorised.(a) Top, is the case where the dataset has a unique feature on z-dimension.82.6% of NNs memorised the feature.Bottom, here noise is added along z, and now the concept is not unique.Indeed now, the proportion of NNs which memorised the unique feature is much smaller (41.4%).(b) We now explore how decision boundaries change whether a unique feature is memorised or not.The decision boundaries for z = 1 (i.e.data points with the unique feature) differ considerably between a network that memorised (bottom) and one that did not (top).

Figure 4 .
Figure 4. Memorisation during training.We depict the proportion (in percentage) of networks which memorised the unique feature per epoch, out of 100 runs with different seeds.We also display the mean test accuracy over the 100 NNs for each epoch.

Figure 5 .
Figure5.We measure unique feature memorisation in CIFAR-10 by inferring a trained model's confidences on test images containing the unique feature.We find that the memorisation score reduces when we corrupt the unique feature by successively removing pixels during inference.This indicates that the model memorises the entire unique feature and not a corrupted version.

Figure 7 .
Figure 7. Correlation between M score in different privacy settings for the Celeb-A dataset.We show that unique feature memorisation can be measured without access to the original training data or to the unique feature label.The "white box" M score is shown along the x-axis and the "grey box" (a) or "black box" (b) M score is shown on the y-axis.

Figure 8 .
Figure 8. GradCAM explanations focus on memorised unique features in the CheXpert 17 dataset (upper left).However, after removing the unique features, the model's predictions are explained by the physiology of the patient (lower left).On test set images, right, physiological features are ignored when a unique feature is present.When the feature is removed, the network finds another spurious correlation shown in a red box.

Table 1 .
Neural networks used in this paper.
Identifying memorisation in private settingsSince UFM poses privacy concerns, we now focus on identifying memorisation in more restrictive settings where 1. we do have access to the unique feature and training data but do not have access to the unique feature label and the model weights, which we call the "grey box" setting; 2. we additionally remove access to the training data, i.e. the "black box" setting, where we only have access to unique feature.

Table 2 .
Unique feature memorisation occurs frequently in neural networks.Here we show average M scores for a range of datasets and model architectures.

Table 3 .
Max M scores for models with explicit and implicit regularisers, such as dropout, data augmentation, and batch normalisation.