Giter Site home page Giter Site logo

jho12 / multitask-cyberthreat-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ndionysus/multitask-cyberthreat-detection

0.0 0.0 0.0 286.42 MB

This fork is created for a project report for CS541 at Stevens Institute of Technology. This repository holds the data, source code and resulting model weights for the paper "Towards end-to-end Cyberthreat Detection from Twitter using Multi-Task Learning" to be presented at IJCNN 2020.

License: MIT License

Python 100.00%

multitask-cyberthreat-detection's Introduction

Requirements

  • 3.6.1 <= python <= 3.8.x
  • torch == 1.5.1
  • scikit-learn == 1.0.2
  • tqdm == 4.63.0
  • pandas == 1.0.5
  • pytorch-crf == 0.7.2

Running the Binary Classification Model

python bin_classifier.py -conf conf/bin/cnn.json -save true
python bin_classifier.py -conf conf/bin/cnn_rnn.json -save true
python bin_classifier.py -conf conf/bin/rnn_cnn.json -save true
python bin_classifier.py -conf conf/bin/rnn.json -save true

Running the Named Entity Recognition Model

python ner_classifier.py -conf conf/ner/cnn.json -save true
python ner_classifier.py -conf conf/ner/cnn_rnn.json -save true
python ner_classifier.py -conf conf/ner/rnn_cnn.json -save true
python ner_classifier.py -conf conf/ner/rnn.json -save true

Running the Multi-task Model

python mt_classifier.py -conf conf/mt/cnn.json -save true
python mt_classifier.py -conf conf/mt/cnn_rnn.json -save true
python mt_classifier.py -conf conf/mt/rnn_cnn.json -save true
python mt_classifier.py -conf conf/mt/rnn.json -save true

Finding Model Results

All model results will be stored in ckpts. bin corresponds to the binary classifier, ner corresponds to the named entity recognition model, and mt corresponds to the multi-task model.

Running Grid Search

Running grid search will take an extremely long amount of time. Results for grid search will be stored in results. If the folder does not exist, run the script and the folder will be created automatically.

python grid_search.py -task bin -arch cnn
python grid_search.py -task bin -arch cnn_rnn
python grid_search.py -task bin -arch rnn_cnn
python grid_search.py -task bin -arch rnn

python grid_search.py -task ner -arch cnn
python grid_search.py -task ner -arch cnn_rnn
python grid_search.py -task ner -arch rnn_cnn
python grid_search.py -task ner -arch rnn

python grid_search.py -task mt -arch cnn
python grid_search.py -task mt -arch cnn_rnn
python grid_search.py -task mt -arch rnn_cnn
python grid_search.py -task mt -arch rnn

multitask-cyberthreat-detection's People

Contributors

ndionysus avatar jho12 avatar

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.