Adversarial Learning¶
Summary¶
|
Adversarial Matrix Factorization |
|
Adversarial Multimedia Recommender |
AMF¶
-
class
elliot.recommender.adversarial.AMF.AMF.
AMF
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Adversarial Matrix Factorization
For model details, please refer to the paper
- The model support two adversarial perturbations methods:
FGSM-based presented by X. He et al in paper <https://arxiv.org/abs/1808.03908>
MSAP presented by Anelli et al. in paper <https://journals.flvc.org/FLAIRS/article/view/128443>
- Parameters
meta – eval_perturbations: If True Elliot evaluates the effects of both FGSM and MSAP perturbations for each validation epoch
factors – Number of latent factor
lr – Learning rate
l_w – Regularization coefficient
l_b – Regularization coefficient of bias
eps – Perturbation Budget
l_adv – Adversarial regularization coefficient
adversarial_epochs – Adversarial epochs
eps_iter – Size of perturbations in MSAP perturbations
nb_iter – Number of Iterations in MSAP perturbations
To include the recommendation model, add it to the config file adopting the following pattern:
models: AMF: meta: save_recs: True eval_perturbations: True epochs: 10 batch_size: 512 factors: 200 lr: 0.001 l_w: 0.1 l_b: 0.001 eps: 0.1 l_adv: 0.001 adversarial_epochs: 10 nb_iter: 20 eps_iter: 0.00001 # If not specified = 2.5*eps/nb_iter
AMR¶
-
class
elliot.recommender.adversarial.AMR.AMR.
AMR
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Adversarial Multimedia Recommender
For further details, please refer to the paper
- The model support two adversarial perturbations methods:
FGSM-based presented by X. He et al in paper <https://arxiv.org/pdf/1809.07062.pdf>
MSAP presented by Anelli et al. in paper <https://journals.flvc.org/FLAIRS/article/view/128443>
- Parameters
meta – eval_perturbations: If True Elliot evaluates the effects of both FGSM and MSAP perturbations for each validation epoch
factors – Number of latent factor
factors_d – Image-feature dimensionality
lr – Learning rate
l_w – Regularization coefficient
l_b – Regularization coefficient of bias
l_e – Regularization coefficient of image matrix embedding
eps – Perturbation Budget
l_adv – Adversarial regularization coefficient
adversarial_epochs – Adversarial epochs
eps_iter – Size of perturbations in MSAP perturbations
nb_iter – Number of Iterations in MSAP perturbations
To include the recommendation model, add it to the config file adopting the following pattern:
models: AMR: meta: save_recs: True eval_perturbations: True epochs: 10 batch_size: 512 factors: 200 factors_d: 20 lr: 0.001 l_w: 0.1 l_b: 0.001 l_e: 0.1 eps: 0.1 l_adv: 0.001 adversarial_epochs: 5 eps_iter: 0.00001 nb_iter: 20 nb_iter: 20 eps_iter: 0.00001 # If not specified = 2.5*eps/nb_iter