Giter Site home page Giter Site logo

fmrt's Introduction

FM-RT

An unofficial pytorch implementation of FM-RT:

Yang Liu, Xianzhuo Xia, Liang Chen, Xiangnan He, Carl Yang, Zibin Zheng. Certifiable Robustness to Discrete Adversarial Perturbations for Factorization Machines, in SIGIR 2020

Note

The paper used a FM as:

FMRT2.py is the corresponding implementation.

However, I cannot see similar metrics. Before FMRT, the avg-max $q$ is only 1.12, while the paper showed 1.60.

So I followed the formula Rendle adopted, which is

Then I use FMRT.py by default. It dismissed elements on the diagonal.

Here's the performance comparison:

Files in the folder

  • src/
    • BaseModel.py: The base class encapsulates device initialization, train & test tasks for rank, classification and regression.
    • FMRT.py: Derived from BaseModel. Include training and evaling methods.
    • dataset.py: Derived from torch.util.data.Dataset
      • FeatureDataset: Dataset for FM.
  • main.py: You can look for descriptions of args with -h
  • ../benchmarks/datasets/

Acknowledgements

For FM, We use torchfm with few changes.

fmrt's People

Contributors

mogicianxd avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

sandy4321

fmrt's Issues

reshape data in dataset.py

Hi,

in line 10 of dataset.py file, it reshapes the feature to (1+neg_num, feature.shape[-1]).
What is neg_num? and why there is a need to reshape feature?

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.