Skip to content
/ TMLlib Public

A Trustworthy Machine Learning Algorithm Library

Notifications You must be signed in to change notification settings

PKU-ML/TMLlib

Repository files navigation

TMLlib

A Trustworthy Machine Learning Algorithm Library. This repo collects the official implementations of works done by Yisen Wang and his students.

TODO

  • Our repo is released!
  • [] Add README.
  • [] Add package dependency and scripts to start the code.
  • [] Report benchmark results for reference.

Environment

The environment in which we build this repo is given in requirements.txt. Run the below command to configure the environment.

  pip install -r requirements.txt

List of contents

Implemented Methods & Usage

To start the code

  python main_baseat.py --yaml config/baseat.yaml

Parameters are given in config/baseat.yaml.

2. Improving Adversarial Training Requires Revisiting Mis-classified Examples (MART)

To start the code

  python main_mart.py --yaml config/mart.yaml

Parameters are given in config/mart.yaml.

3. Adversarial Weight Perturbations Help Robust Generalization (AWP)

To start the code

  python main_awp.py --yaml config/awp.yaml

Parameters are given in config/awp.yaml.

4. Generalist: Decoupling natural and robust generalization (Generalist)

To start the code

  python main_generalist.py --yaml config/generalist.yaml

Parameters are given in config/generalist.yaml.

5. Rethinking the effect of data augmentation in adversarial contrastive learning (DynACL)

To start the code

  python main_dynacl.py --yaml config/dynacl.yaml // Pretraining
  python main_dynacllinear.py --yaml config/dynacllinear.yaml // Linear-Probing

Parameters are given in config/dynacl.yaml.

6. Balance, Imbalance, and Rebalance: Understanding Robust Overfitting from a Minimax Game Perspective (ReBAT)

To start the code

  python main_rebat.py --yaml config/rebat.yaml 

Parameters are given in config/rebat.yaml.

Evaluate

To evaluate the accuracy/robustness of pre-trained model

  python main_eval.py --yaml config/eval.yaml 

Parameters are given in config/eval.yaml.

Acknowledgement

We refer some of the links below while building this repo. We sincerely acknowlegde their great work!

About

A Trustworthy Machine Learning Algorithm Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages