tapas.threat_models.attacker_knowledge.UncertainBoxKnowledge

class tapas.threat_models.attacker_knowledge.UncertainBoxKnowledge(generator: Generator, num_synthetic_records: int, prior: Callable[[], dict], final_parameters: dict = None)

Bases: tapas.threat_models.attacker_knowledge.AttackerKnowledgeOnGenerator

The attacker has uncertain knowledge of the generator: they have access to the code, but not to some “parameters” of the code. Instead, the attacker has a prior (distribution) of acceptable parameters.

__init__(generator: Generator, num_synthetic_records: int, prior: Callable[[], dict], final_parameters: dict = None)

Initialise an attacker with uncertain knowledge of some parameters in the generator.

Parameters
  • generator (Generator) – The generator object. This generator must accept additional keyword arguments in its __call__ method.

  • num_synthetic_records (int) – The number of synthetic records to generate.

  • prior (function () -> dict) – A randomised functions which draws from the attacker’s prior over the parameters of the method.

  • final_parameters (dict (default None)) – The actual parameters used to generate the final dataset. If this is not specified, a new random draw from the prior is used every time (meaning the prior is accurate).

Methods

__init__(generator, num_synthetic_records, prior)

Initialise an attacker with uncertain knowledge of some parameters in the generator.

generate(training_dataset, training_mode)

Generate a synthetic dataset from a given training dataset.

Attributes

label

A string to represent this knowledge.

generate(training_dataset: Dataset, training_mode: bool)

Generate a synthetic dataset from a given training dataset.

property label

A string to represent this knowledge.