Giter VIP home page Giter VIP logo

large_batch_bald's Introduction

Scalable Batch Acquisition for Deep Bayesian Active Learning

This is a PyTorch implementation of the SDM 2023 paper Scalable Batch Acquisition for Deep Bayesian Active Learning. Our work present a new Bayesian active learning algorithm called Large BatchBALD aka LBB (and its stochastic extension Power Large BatchBALD aka PLBB), which gives a well-grounded approximation to the BatchBALD method and aims to achieve comparable quality while being more computationally efficient.

Install

pip install batchbald_redux

Train-evaluation examples

FMNIST with MC-dropout:

python sampling_train.py --dataset_name='FMNIST' --model_name='CNN_MC_RMNIST' --uns_type='MC' --algs PLBB PBALD Rand LBB BALD BB MaxProb --random_seeds 42 227 346 684 920 --acq_batch_size=10 --num_init_samples=20 --max_train_samples=500

RCIFAR-100 with deep ensembles:

python epochs_train.py --dataset='RCIFAR10' --model_name='ResNet-18' --optimizer_name='SGD' --uns_type='ENS' --algs PLBB PBALD Rand LBB BALD MaxProb --random_seeds 42 227 346 684 920 --acq_batch_size=100 --train_batch_size=100 --num_init_samples=2000 --max_train_samples=10000 --num_epochs=50

Experimental setup

All code related to the BALD and BatchBALD algorithms and the corresponding modules are taken from the batchbald_redux repository. All datasets and implemented algorithms are placed in the batchbald_redux/ directory. Train-evaluation files are placed in the main directory, results are saved in the results/ directory with the corresponding config. Several training options are available: sample-wise training via sampling_train.py and regular epoch-wise training via epochs_train.py. There are also several options for uncertainty estimation: MC-dropout and deep ensembles (available through the training arguments).

Available active learning algorithms:

Datasets:

  • MNIST-based: MNIST, RMNIST, FMNIST, EMNIST, KMNIST
  • CIFAR-based: CIFAR-10, CIFAR-100, RCIFAR-10, RCIFAR-100
  • Others: SVHN, AG News (text)

Citation

@article{rubashevskii2023sbadbal,
  title={Scalable Batch Acquisition for Deep Bayesian Active Learning},
  author={Rubashevskii, Aleksandr and Kotova, Daria and Panov, Maxim},
  journal={arXiv preprint arXiv:2301.05490},
  year={2023}
}

Big thanks to batchbald_redux, our code is partially borrowed from them.

large_batch_bald's People

Contributors

rubaha96 avatar dahakot 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.