Coder Social home page Coder Social logo

radioactive-lab's Introduction

Radioactive data

This is EleutherAI's reimplementation of the paper "Radioactive data: tracing through training".

Their GitHub repo can be found here. Warning: The official open source implementation has a fairly complicated framework, as well as miscellaneous issues like hard-coded paths that will prevent you from running it.

We spent a fair amount of time getting the original implementation working with CIFAR10, then chose to do a full refactor after understanding the core requirements.

Our implementation is a refined version designed to demonstrate the marking, training and detection steps using the CIFAR10 dataset, with each stage self contained within its own python module. We have added logging to TensorBoard for your visualization enjoyment.

Prior to implementing the training stage we created a full working example of a resnet18 classifer trained on CIFAR10. This can be used to benchmark your particular hardware and choose a good optimizer prior to running the main code. It's also a good starting point for ML beginners.

Install

First setup pytorch. Example for GPU enabled using conda:

conda create --name radioactive_lab python=3.8
conda activate radioactive_lab
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

After that use pip to install other requirements:

pip install -r requirements.txt

If anything is missing, simply pip install [missing requirement].

Running

Please follow the basic_example.ipynb example.

For any other questions please visit our Discord!

License

This repository is licensed under the CC BY-NC 4.0.

radioactive-lab's People

Contributors

researcher2 avatar stellaathena avatar alexandresablayrolles avatar mdouze avatar

Stargazers

grieve.eth avatar jaso avatar Nefelibat avatar  avatar zzz avatar Orest Xherija avatar  avatar Igor Krawczuk avatar STYLIANOS IORDANIS avatar

Watchers

James Cloos avatar  avatar  avatar paper2code - bot avatar

radioactive-lab's Issues

Applying the methodology to text

This issue is for discussing how to apply the methodology to text data, with a focus on which aspects differ from image data and why.

Refactor underlying framework

Now that we have the basic framework up and running, we want to update the code to be in accordance with best practices.

Implement CIFAR 10 on resnet18

Now that we have the basic functionality working, Laurence is going to integrate a serious deep learning model into the code as a skills building exercise and to ensure he is comfortable working with the code.

Replicate the paper's experiments.

To ensure that our refactored code is working properly, we need to replicate the experiments from the paper. We want to replicate the following experiments:

  • Results (Table 2, Figure 6)
  • Architecture transfer (Table 3)
  • Transfer to other datasets (Table 4)
  • Robustness to distillation (Table 5)

Improved detection

Instead of doing the hypothesis testing carried out in the paper, an alternative methodology for detecting radioactive data seems feasible: Take your random vector u and compute the "pure adversarial example," the random noise that the model thinks only contains the feature associated with vector u. Then send that image forward through the network. Since it's just random noise, most models should classify it randomly. However a model trained on radioactive data will see the feature u and know how to classify it.

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.