Official implementation of "Bandit Guided Submodular Curriculum for Adaptive Subset Selection" accepted at NeurIPS 2025.
Authors: Prateek Chanda, Prayas Agrawal, Saral Sureka, Lokesh Reddy Polu, Atharv Kshirsagar, Ganesh Ramakrishnan
- Overview
- Key Features
- Installation
- Quick Start
- Repository Structure
- Experiments
- Citation
- License
- Acknowledgments
New to the project? Check out our Quick Start Guide for a 5-minute introduction!
This repository contains the implementation of a novel bandit-guided submodular curriculum learning framework for adaptive data subset selection during training of deep learning models. Our method combines multi-armed bandits with submodular optimization to create an adaptive curriculum that selects informative data subsets throughout training, significantly reducing computational costs while maintaining or improving model performance.
- Python 3.8 or higher
- CUDA 11.8+ (for GPU support)
- PyTorch 2.0+
git clone https://github.com/efficiency-learning/banditsubmod.git
cd banditsubmodWe recommend using separate environments for vision and LLM experiments.
cd OnlineSubmod-vision
pip install -e .
pip install -r requirements.txtcd OnlineSubmod-LLM
pip install -r requirements.txtπ Detailed Guide: See QUICKSTART.md for a complete 5-minute tutorial!
cd OnlineSubmod-vision
# Install dependencies
pip install -e .
pip install -r requirements.txt
# Run example with bandit-guided curriculum
python example_cifar10.pycd OnlineSubmod-LLM
# Install dependencies
pip install -r requirements.txt
# Set up Hugging Face (required for LLaMA-2)
huggingface-cli login
# Run example
bash example_mmlu.shbanditsubmod/
βββ OnlineSubmod-vision/ # Computer vision experiments
β βββ cords/ # Data selection strategies
β β βββ selectionstrategies/ # Core selection algorithms
β β βββ utils/ # Utility functions and models
β βββ configs/ # Configuration files
β β βββ SL/ # Supervised learning configs
β β βββ SSL/ # Semi-supervised learning configs
β β βββ HPO/ # Hyperparameter optimization configs
β βββ train_online_submod_sl4_gradbatch.py # Main training script
β βββ setup.py # Package installation
β
βββ OnlineSubmod-LLM/ # Large language model experiments
β βββ less/ # LLM data selection framework
β β βββ data_selection/ # Data preprocessing and selection
β β βββ train/ # Training utilities
β β β βββ gctrainer.py # Gradient-based trainer
β β β βββ submod.py # Submodular optimization
β β β βββ train.py # Main training loop
β β βββ layers/ # Custom layers (LoRA, etc.)
β βββ online_batch_select_mmlu.sh # MMLU experiment script
β βββ run.sh # Main run script
β
βββ README.md # This file
βββ LICENSE # MIT License
βββ CONTRIBUTING.md # Contribution guidelines
Our framework supports various vision benchmarks:
# CIFAR-10 with 30% data selection
python train_online_submod_sl4_gradbatch.py \
--config configs/SL/config_onlinesubmod_cifar10.py
# CIFAR-100 with different selection fractions
python train_online_submod_sl4_gradbatch.py \
--config configs/SL/config_onlinesubmod_cifar100.pypython train_online_submod_sl4_gradbatch.py \
--config configs/SL/config_onlinesubmod_mnist.pypython train_online_submod_sl4_gradbatch.py \
--config configs/SL/config_onlinesubmod_tinyimagenet.pycd OnlineSubmod-LLM
bash online_batch_select_mmlu.sh onlineSubmod 8 0.05 2 mmlu llama2 1 2e-05 42 1 high_school_chemistry PREFIX 2# Edit run.sh to specify your parameters
PREFIX=your_experiment_name
METHOD=onlineSubmod # or SBERT, random, etc.
GPU=0
EVAL=your_evaluation_task
BS=8 # batch size
NVAL=2 # validation samples
FRAC=0.05 # data fraction
bash run.shKey configuration parameters for data selection:
- Selection Strategy:
OnlineSubmod,OnlineSubmodPB(Per-Batch),Random,CRAIG,GradMatch,GLISTER - Submodular Function:
facilityLocation,graphCut,logDeterminant,disparity-min,disparity-sum - Selection Fraction: Proportion of data to select (e.g., 0.3 for 30%)
- Selection Frequency: How often to perform selection (e.g., every epoch)
- Bandit Parameters:
epsilon: Exploration rate for Ξ΅-greedyeta: Learning rate for bandit updateslambda: Mixing parameter for importance sampling
See configs/README.md for detailed configuration documentation.
If you find this work useful, please cite our NeurIPS 2025 paper:
@inproceedings{chanda2025bandit,
title={Bandit Guided Submodular Curriculum for Adaptive Subset Selection},
author={Chanda, Prateek and Agrawal, Prayas and Sureka, Saral and Polu, Lokesh Reddy and Kshirsagar, Atharv and Ramakrishnan, Ganesh},
booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
year={2025}
}This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
# Clone the repository
git clone https://github.com/efficiency-learning/banditsubmod.git
cd banditsubmod
# Create a development environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e OnlineSubmod-vision/
pip install -e OnlineSubmod-LLM/- Built on top of the CORDS framework for data subset selection
- LLM experiments adapted from LESS framework
- Submodular optimization using submodlib
- Thanks to the NeurIPS 2025 reviewers for their valuable feedback
For questions or issues, please:
- Open an issue on GitHub
- Contact: prateek.chanda@cse.iitb.ac.in
If you find this repository useful, please consider giving it a star β!
Keywords: Data Selection, Submodular Optimization, Multi-Armed Bandits, Curriculum Learning, Efficient Deep Learning, Online Learning, Computer Vision, Natural Language Processing, LLM Fine-tuning