This repository contains the implementation of "Benchmark for Uncertainty & Robustness in Self-Supervised Learning", including a comparison of ERM, Context Prediction, Rotation Prediction, Geometric Transformation Prediction, and Jigsaw Puzzle.
Details of the model and experimental results can be found in our following arXiv paper:
@misc{bui2022benchmark,
title={Benchmark for Uncertainty & Robustness in Self-Supervised Learning},
author={Ha Manh Bui and Iliana Maifeld-Carucci},
year={2022},
eprint={2212.12411},
archivePrefix={arXiv},
primaryClass={cs.CV}
}Please CITE our paper if you find it useful in your research.
Install prerequisite packages:
python -m pip install -r requirements.txtDownload and unzip the datasets:
bash setup.shRun with 10 different seeds:
for i in {1..10}; do
taskset -c <cpu_index> python main.py --config <config_path> --exp_idx $i --gpu_idx <gpu_index>
donewhere the parameters are the following:
<cpu_index>: CPU index. E.g.,<cpu_index> = "1"<config_path>: path stored configuration hyper-parameters. E.g.,<config_path> = "algorithms/Jigsaw/configs/CIFAR10.json"<gpu_index>: GPU index. E.g.,<gpu_index> = "0"
BERT-GPT2 experiments are provided in notebooks in "algorithms/BERT-GPT2/"
Note: Select different settings by editing in /configs/..json, logging results are stored in /results/logs/
python utils/ebar_plot.py
python utils/box_plot.py
python utils/plot_density.py
python utils/plot_density_methods.py
python utils/reliability_diagram.pyNote: All checkpoints are stored at this google drive folder.
Note: All results are recorded at this google excel.
This source code is released under the Apache-2.0 license, included here.




