tapas.datasets.canary.create_canary
- tapas.datasets.canary.create_canary(dataset: tapas.datasets.dataset.TabularDataset)
Create a “canary”, a record which should stand out in the dataset and therefore is more likely to be identified in MIAs.
This works by adding new categories to the description that are unique to this record, and setting continuous attributes as the current maximum plus some margin.
This also creates a modified dataset with an updated description. Importantly, the canary is not part of the modified dataset, so it does not need to be removed before passing the dataset to auxiliary knowledge.
- Parameters
dataset (TabularDataset) – The dataset for which to generate a canary.
- Returns
new_dataset (TabularDataset) – The input dataset with an updated description that takes the canary into account. The content is unchanged, dataset.data = new_dataset.data.
record (TabularDataset) – The canary. Use this record as target in MIAs.