GithubHelp home page GithubHelp logo

jesseguerrero / attacking_neural_text_detectors Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mwolff31/attacking_neural_text_detectors

1.0 0.0 0.0 5.1 MB

Code for "Attacking Neural Text Detectors"

Home Page: https://arxiv.org/abs/2002.11768

Python 100.00%

attacking_neural_text_detectors's Introduction

Attacking Neural Text Detectors

The original dataset in "./data/" is 100% synthetic, generated by GPT-2. we are trying to see if they can be fooled as human written. Run main.py to start experiments, here are some global constants...
EXPERIMENT_NAME is the name of the folder to hold the results files
ADVERSARIAL_TYPE is the type of changes we make to each text.
TEXT_TO_CHANGE is the number of texts to make adversarial.

Adversarial Types:
-'do-nothing': Nothing is done
-'replace-char': Replace homoglyphs below
-'random-order-replace-char': Same as replace char except the input text lines are shuffled
-'misspelling': Replaces certain words with misspellings from misspellings.json.


Original README.md

Code for "Attacking Neural Text Detectors" (https://arxiv.org/abs/2002.11768).

Run python download_dataset.py to download the GPT-2 top k-40 neural text test set created by OpenAI. For more documentation regarding this and similar datasets, visit https://github.com/openai/gpt-2-output-dataset.

OpenAI RoBERTa neural text detector can be downloaded by running wget https://openaipublic.azureedge.net/gpt-2/detector-models/v1/detector-large.pt.

Install requirements via pip install -r requirements.txt.

Run python main.py to run a sample experiment.


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.