This repository contains code for reproducing all the experiments in the paper "Poisoning Bayesian Inference via Data Deletion and Replication" (https://arxiv.org/abs/2503.04480).
Install all required dependencies using
conda env create -f poisoning_bayesian_inference.ymlFinally, install package using
pip install -e .The results of the simulation study of Section 6.1 can be replicated with the notebook simulation_study_NIG.ipynb.
The additional results obtained with the same model presented in the supplementary materials can be replicated with:
-
simulation_study_NIG_roudning_effect.ipynbfor the continuous relaxation problem (Section 5.2 of supplementary materials). -
simulation_study_NIG_KL_evolution_heuristics.ipynbfor the convergence speed of different heuristics (Section 5.3 of supplementary materials). -
simulation_study_NIG_noise_level_effect.ipynbfor the noise level experiment (Section 5.4 of supplementary materials). -
simulation_study_NIG_decrease_uncertainty.ipynbandsimulation_study_NIG_increase_uncertainty.ipynbfor the uncertainty experiment (Section 5.5 of supplementary materials).
The attack on the house prices dataset from Section 6.2 can be replicated with the notebook house_prices.ipynb, and the one against the Mexico microcredit dataset with microcredit.ipynb (Section 6.3).
The experiments with the gray-box attack scenario from Section 6.1.3 of supplementary materials can be found in the notebook house_prices.ipynb.
The attack on the spam classifier from Section 6.3 of supplementary materials can be replicated with the notebooks spam_classification_send.ipynb and spam_classification_your.ipynb.