tapas.threat_models.attacker_knowledge.AttackerKnowledgeWithLabel

class tapas.threat_models.attacker_knowledge.AttackerKnowledgeWithLabel

Bases: tapas.threat_models.attacker_knowledge.AttackerKnowledgeOnData

Abstract base class that builds on AttackerKnowledgeOnData that adds the functionality of labeling the datasets. Such labels can be represent, e.g., whether a specific user is part of the dataset. This is used to define membership/attribute inference attacks.

__init__()

Methods

__init__()

generate_datasets(num_samples[, training])

Generate num_samples training or testing datasets.

generate_datasets_with_label(num_samples[, ...])

Generate num_samples training or testing datasets with corresponding labels (arbitrary ints or bools).

Attributes

label

A string to represent this knowledge.

abstract generate_datasets(num_samples: int, training: bool = True) list[Dataset]

Generate num_samples training or testing datasets.

abstract generate_datasets_with_label(num_samples: int, training: bool = True) tuple[list[Dataset], list[int]]

Generate num_samples training or testing datasets with corresponding labels (arbitrary ints or bools).

property label

A string to represent this knowledge.