privacytrustlab / ml_privacy_meter

Privacy Meter: An open-source library to audit data privacy in statistical and machine learning algorithms.
MIT License
556 stars 99 forks source link

Question regarding ussage of ModelIntermediateOutput class in information_source_signal.py #105

Open GowriRamshankar opened 1 year ago

GowriRamshankar commented 1 year ago

Hi I have a question with regards to the implementation of ModelIntermediateOutput class in information_source_signal.py. The class uses a dictionary with key "layers" to determine which layer's output must be extracted as input sihnal to the attack. Should the dictionary be passed as a parameter to the constructor? If yes, It does not have an init method.

I assume we need to define an init function.

Also, in get_intermediate_outputs method in PytorchModelTensor in model.py, self.intermediate_output is a dictionary that is not defined. Can you explain what is expected to be implemented here?

Thanks so much for the help!

changhongyan123 commented 1 year ago

Hi @GowriRamshankar , At the moment, we do not offer support for attacks that utilize the model's intermediate output (activation of the model from each layer). We are currently working on this, and we plan to include this function in future versions.