Git Product home page Git Product logo

artificial-adversary's People

Contributors

100 avatar avery-whitaker avatar ljharb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artificial-adversary's Issues

Stop using whitespace as word separator

Currently this assumes words are separated by spaces. If this is not the case, or if an earlier attack removes a space, several words may be treated as a single word (such as send.me.money).

One way around this is explicitly to keep track of word indices in the original string (assume here that they are separated by whitespace), and then modify these as attacks modify words/text.

Add other attack mechanisms

Right now we assume no feedback between adversary and classifier.

What if the adversary has access to the labels? What if the adversary has access to the raw probabilities? What is the adversary has access to some observation that can be linked back to the label or probability?

These are very broad, and while some have been addressed in machine learning literature, there are many possible takes on this as it specifically applies to text classification.

Potential ideas (this list will grow):

  • Use Lime to identify words that are important to classification results and apply targeted attacks
  • Simulate a sequence of back-and-forths between classifier and adversary

Add more basic attacks

There are many possible attacks that have not yet been implemented.

Some of these include:

  • Phrase-level attacks
    • Invert part-of-speech order
    • Change tense
  • Replacing words with homonyms, or symbols that are pronounced as a homonym (ate -> eight, for -> 4)
  • Surrounding characters (or other alternating patterns) (bank -> (b)(a)(n)(k))

test accuracy of adversarial text examples

I think it is necessary to add an experiment that compare the test accuracy of the original text and the adversarial text examples in the target model to judge whether the adversarial text examples really reduce the accuracy.

No module named 'Adversary.adversary'

import Adversary

/anaconda3/lib/python3.6/site-packages/Adversary/init.py in ()
----> 1 from Adversary.adversary import Adversary
2 from Adversary.attacks import *

ModuleNotFoundError: No module named 'Adversary.adversary'

Because /anaconda3/lib/python3.6/site-packages/Adversary/Adversary.py
mv Adversary.py adversary.py

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.