A clean, reproducible deep learning benchmark for comparing optimizers on semantic segmentation using DeepLabV3-ResNet50 and Pascal VOC 2012.
This repository was built as part of a graduate-level empirical study on optimizer behavior across tasks. The current phase focuses on a vision benchmark and compares SGD, Adam, AdamW, and Lion under a fixed training budget while tracking both model quality and systems efficiency.
Most optimizer comparisons are presented only through final accuracy. This project goes further by measuring:
- segmentation quality through
mIoU, loss, and pixel accuracy - convergence behavior across epochs
- optimizer update cost through per-step timing
- memory footprint through optimizer state tracking
- reproducibility through YAML-driven experiments and saved histories
The broader project roadmap extends this benchmark to ADE20K and AG News so the final study covers both vision and NLP workloads.
- Task: Semantic segmentation
- Dataset: Pascal VOC 2012
- Model: DeepLabV3-ResNet50
- Resolution:
256 x 256 - Batch size:
8 - GPU used: NVIDIA RTX 3060 (6 GB)
- Comparison budget: first
25epochs for each optimizer
Under the common 25-epoch comparison budget:
- SGD achieved the strongest overall performance with best validation
mIoU = 0.6564 - AdamW was the strongest adaptive baseline with best validation
mIoU = 0.6421 - Adam remained competitive but trailed SGD and AdamW
- Lion used lower optimizer-state memory than Adam/AdamW, but underperformed in both accuracy and optimizer-step efficiency in this setup
These results make Pascal VOC a strong first-stage benchmark for a larger optimizer study across datasets and tasks.
651_project/
|-- configs/ # YAML experiment configs
|-- docs/ # Report source and report-ready figures
|-- outputs/ # Training runs, checkpoints, and comparison plots
|-- scripts/ # Training, sanity checks, and plotting entry points
|-- src/
| |-- data/ # Pascal VOC dataset and transforms
| |-- models/ # Model factory for segmentation architectures
| `-- training/ # Step logic, epoch metrics, and optimizer utilities
|-- README.md
`-- requirements.txt
- Pascal VOC dataloader with paired image-mask transforms
- DeepLabV3-ResNet50 model factory
- YAML-configured training pipeline with
tqdmprogress bars - Epoch-level tracking for:
- loss
mIoU- pixel accuracy
- throughput
- forward/backward/optimizer step time
- optimizer-state memory
- Multi-optimizer experiment setup
- Plot generation for side-by-side comparison
- LaTeX report assets for submission-ready writeups
Create an environment and install dependencies:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtIf you are using the same Windows-based environment from WSL, the commands used in this project looked like:
/mnt/c/Users/HIMANSHU/Desktop/langchain/practice/myenv/Scripts/python.exe -m pip install -r requirements.txtDownload Pascal VOC 2012 through the dataloader utility:
python scripts/check_voc_dataloader.py --downloadBy default, the dataset is stored under:
data/VOCdevkit/VOC2012
The default SGD configuration is:
- learning rate:
0.01 - momentum:
0.9 - weight decay:
1e-4
Start training with:
python scripts/train.py --config configs/deeplabv3_resnet50_voc.yamlRun the other optimizers with:
python scripts/train.py --config configs/deeplabv3_resnet50_voc_adam_50ep.yaml
python scripts/train.py --config configs/deeplabv3_resnet50_voc_adamw_50ep.yaml
python scripts/train.py --config configs/deeplabv3_resnet50_voc_lion_50ep.yamlIf you are launching from WSL with the Windows interpreter used during development:
/mnt/c/Users/HIMANSHU/Desktop/langchain/practice/myenv/Scripts/python.exe scripts/train.py --config configs/deeplabv3_resnet50_voc.yamlEach run writes results to its own folder under outputs/, including:
history.jsonlwith per-epoch metricsbest.ptfor the best validation checkpointlast.ptfor the latest checkpoint
Current experiment folders:
outputs/deeplabv3_resnet50_voc_sgd_50epoutputs/deeplabv3_resnet50_voc_adam_50epoutputs/deeplabv3_resnet50_voc_adamw_50epoutputs/deeplabv3_resnet50_voc_lion_50ep
Generate comparison plots with:
python scripts/plot_optimizer_comparison.py --max-epoch 25 --output-dir outputs/comparison_plots_25epThe generated plots are stored in:
outputs/comparison_plots_25epdocs/report_figuresfor report-ready renamed copies
The repository includes small utilities to verify individual pieces before running full experiments:
scripts/check_voc_dataloader.pyscripts/check_model.pyscripts/check_train_step.pyscripts/check_epoch_metrics.py
These are useful for debugging dataset, model, and metric issues before launching long runs.
The LaTeX writeup and report figure assets are stored in:
docs/optimizer_report.texdocs/report_figures/
The next phase of the project extends the benchmark to:
- ADE20K for a harder semantic segmentation benchmark
- AG News for a text classification benchmark
That extension is meant to test whether optimizer behavior remains consistent across datasets, modalities, and training regimes.
Developed by Ananya Jha, Himanshu Ranjan, Mayank, and Sethupathy Raghunathan Venkatraman.