This repository contains code for reproducing all the experiments in the paper "Manipulating Hidden-Markov-Model Inferences by Corrupting Batch Data"
Install all required dependencies using
conda create -f corrupting_hmms
Finally, install package using
pip install -e .
Code for reproducing each of the experiments is provided in folder experiments5.4
To replicate the outcomes related to the path attraction attack, execute the following command:
python experiments5.4/ner_experiment_path_attraction.py
The predefined weight values are params.py
as attack1.
Adjustments to these default values can be made at the end of the experiments5.4/ner_experiment_path_attraction.py
file.
Upon completing the experiments, the results will be stored in pickle files within the results/ner_path_attraction
directory.
Plots can be generated by running the experiment5.4/plot_path_attraction.R
R script.
To replicate the findings related to distribution disruption attack, utilize the following command:
python experiments5.4/ner_experiment_sd.py
The default weight choices are t' = 5
. Adjustments to these default values can be made at the end of the experiments5.4/ner_experiment_sd.py
file.
Upon completion of the experiments, results will be saved in pickle files within the results/ner_sd
directory.
Plots can be by generated running the experiment5.4/plot_sd.R
R script.
To replicate the outcomes associated with state attraction and repulsion attacks, run the following command:
python experiments5.4/ner_experiment_ss.py
The default weight choices are t' = 5
, and the target hidden state is 14. Adjustments to these default values can be made at the end of the experiments5.4/ner_experiment_ss.py
file.
Specifically, set the parameter
Upon completing the experiments, the results will be stored in pickle files within the results/ner_ss_attraction
for the state attraction attack
and results/ner_ss_repulsion
for the state repulsion attack.
Plots can be generated by running the experiment5.4/plot_ss_att.R
and experiment5.4/plot_ss_rep.R
R scripts.