GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kabbi159/fake-text-detection: Fake Text Detection Toy Project in ADS5035 (Data-driven Security and Privacy)

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
probability_classifier
probability_classifier
 
 
README.md
README.md
 
 
baseline.py
baseline.py
 
 
dataset.py
dataset.py
 
 
train.py
train.py
 
 
util.py
util.py
 
 

Repository files navigation

fake-text-detection

Fake Text Detection Toy Project in ADS5035 (Data-driven Security and Privacy)
This is a experiment code on WebText and gpt2-output-dataset
functions in dataset.py and util.py is forked from gpt2-output-detector

Fine-tuned language model classifier

Model Train Top-k 40 Nucleus Random
BERT Top-k
Nucleus
Random
89.79%
82.68%
47.3%
72.22%
78.84%
53.9%
43.79%
64.23%
80.45%
RoBERTa Top-k
Nucleus
Random
98.35%
90.84%
51.17%
69.47%
88.36%
58.75%
49.22%
75.43%
91.34%

Token probability-base Classifier

Baseline Usage

Before run this code, construct dataset data/webtext.{train,dev,test}.jsonl, data/xl-1542M-{k40,nucleus}.{train,dev,test}.jsonl with this format.
You can run this code:

python baseline.py
--max-epochs=2 \
--batch-size=32 \
--max-sequence-length=128 \
--data-dir='data' \
--real-dataset='webtext' \
--fake-dataset='xl-1542M-nucleus' \
--save-dir='logs' \
--learning-rate=2e-5 \
--weight-decay=0 \
--model-name='bert-base-cased' \
--wandb=True

Probability/Rank Extractor Usage

Extract Probability & Rank of each token with 16 Threads num-train-pairs 50000 indicates "Real:Fake = 50,000:50,000"

python prob_extract.py
--batch-size=32 \
--max-sequence-length=128 \
--seed 10 \
--num-workers 16\
--num-train-pairs 50000

About

Fake Text Detection Toy Project in ADS5035 (Data-driven Security and Privacy)

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.