GithubHelp home page GithubHelp logo

ustcml / apt Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 12.17 MB

Tensorflow implementation of TrialAttack (Triple Adversarial Learning for Influence based Poisoning Attack in Recommender Systems. KDD 2021)

Python 100.00%
adversarial-attacks poisoning-attacks recommender-system

apt's Introduction

Fight Fire with Fire: Towards Robust Recommender Systems via Adversarial Poisoning Training

This project is for the paper: Fight Fire with Fire: Towards Robust Recommender Systems via Adversarial Poisoning Training, in proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval. 2021: 1074-1083.

The code was developed on Python 3.6 and tensorflow 1.15.0.

Usage

poionsing data preparation

mkdir poison_data

Put the poisoning data generated by attacks in this folder, and the poisoning data is named dataset_attack_type_attack_size.npy, e.g., ml-100k_random_30.npy.

run main.py

usage: python main.py [--data DATA_NAME] [--gpu GPU_ID]
[--top_k TOP_K] [--extend ERM_USERS] [--target_index TARGET_ITEMS]

optional arguments:
  --dataset DATA_NAME
                        Supported: filmtrust, ml-100k, ml-1m, yelp.
  --gpu GPU_ID
                        GPU ID, default is 0.
  --top_k TOP_K
                        HR@top_k, default is 50.
  --extend ERM_USERS
                        The number of ERM users, default is 50.
  --target_index TARGET_ITEMS
                        The index of predefined target item list: 0, 1 for ml-100k, 2,3 for ml-1m, 4,5 for filmtrust, 6,7 for yelp.

4. Example.

python main.py --dataset ml-100k --gpu 0 --top_k 50 --extend 50 --target_index 0

apt's People

Contributors

daftstone avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.