Giter VIP home page Giter VIP logo

trojai-cyber-pdf's Introduction

This repo contains a the code for TrinitySRITrojAI submission to the cyber-pdf-dec2022 round of the TrojAI leaderboard.

Dependencies

First install the dependencies required by https://github.com/usnistgov/trojai-example.

Additional dependencies

pip install pandas
pip install scipy
pip install scikit-learn

Usage

Clone code into <root>/trojai-cyber-pdf

Download and extract training set cyber-pdf-dec2022-train.tar.gz into <root>/trojai-datasets/cyber-pdf-dec2022-train

cd into <root>/trojai-cyber-pdf and run the following commands

First run feature extraction on the training set.

python weight_analysis.py

This will produce a feature file <root>/trojai-cyber-pdf/data_cyber-pdf_weight.pt.

Then run cross-validation hyperparameter search using the feature file and a pre-defined detector architecture

python crossval_folds_v2.py --arch arch.mlp_set5 --data data_cyber-pdf_weight.pt --nsplits 7

This will produce a set of learned detector parameters at <root>/trojai-cyber-pdf/sessions/0000000/.

Finally copy the detector parameters into a learned_parameters folder and build the singularity container.

cp -r ./sessions/0000000/ ./learned_parameters
python metafile_generator.py
./build.sh

The script will test inference functionalities and build a container at cyber-pdf-dec2022_sts_SRI_weight_grad_v1.simg.

trojai-cyber-pdf's People

Contributors

frkl 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.