An open API service indexing awesome lists of open source software.

https://github.com/eidoslab/neuralvelocity

NeVe - Neural Velocity for hyperparameter tuning (IJCNN 2025)
https://github.com/eidoslab/neuralvelocity

Last synced: 7 months ago
JSON representation

NeVe - Neural Velocity for hyperparameter tuning (IJCNN 2025)

Awesome Lists containing this project

README

          

# ๐Ÿง  [IJCNN 2025] NeVe: Neural Velocity for hyperparameter tuning

[![Docker Ready](https://img.shields.io/badge/docker-ready-blue?logo=docker)](https://www.docker.com/)
[![GPU Support](https://img.shields.io/badge/GPU-Supported-green?logo=nvidia)](https://developer.nvidia.com/cuda-zone)
[![Python 3.8.8](https://img.shields.io/badge/python-3.8.8-blue.svg)](https://www.python.org/downloads/release/python-388/)
[![PyTorch](https://img.shields.io/badge/framework-PyTorch-EE4C2C?logo=pytorch)](https://pytorch.org/)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![arXiv](https://img.shields.io/badge/arXiv-xxxx.xxxxx-b31b1b.svg)](https://arxiv.org/abs/xxxx.xxxxx)

This repository contains the official implementation of the paper:
> **Neural Velocity for hyperparameter tuning**
> *Gianluca Dalmasso, et al.*
> IJCNN 2025
> ๐Ÿ“„ [arXiv / DOI link here]

---

![Teaser](assets/teaser.png)

## ๐Ÿ“‚ Project Structure
```bash
NeuralVelocity/
โ”œโ”€โ”€ ๐Ÿ“ assets/ # Teaser images, figures, etc.
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ dataloaders/ # CIFAR, ImageNet loaders
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ labelwave/ # Competing method: LabelWave
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ ultimate_optimizer/ # Competing method: Ultimate Optimizer
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ neve/ # ๐Ÿ’ก Core method: Neural Velocity
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ models/ # Model architectures (e.g. CIFAR ResNets, INet ResNets, ...)
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ optimizers/ # Optimizers
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ schedulers/ # LR schedulers
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ swin_transformer/ # Swin Transformer model architecture
โ”‚ โ”œโ”€โ”€ arguments.py # CLI args and config parser
โ”‚ โ”œโ”€โ”€ classification.py # Training pipeline (base)
โ”‚ โ”œโ”€โ”€ classification_labelwave.py # For LabelWave experiments
โ”‚ โ”œโ”€โ”€ classification_ultimate_optimizer.py # For Ultimate Optimizer experiments
โ”‚ โ””โ”€โ”€ utils.py # Utility functions
โ”œโ”€โ”€ Dockerfile # Default Docker container
โ”œโ”€โ”€ Dockerfile.python # Base Python environment
โ”œโ”€โ”€ Dockerfile.sweep # Sweep setup (e.g. for tuning)
โ”œโ”€โ”€ LICENSE # GNU GPLv3 license
โ”œโ”€โ”€ README.md # Project overview
โ”œโ”€โ”€ build.sh # Build script (e.g. for Docker or sweep)
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ””โ”€โ”€ setup.py # Install package for pip
```

---

## ๐Ÿš€ Getting Started
You can run this project either using a Python virtual environment or a Docker container.

#### โœ… Clone the repository
```bash
git clone https://github.com/EIDOSLAB/NeuralVelocity.git
cd NeuralVelocity
```

### ๐Ÿงช Option A โ€” Run with virtual environment (recommended for development)

#### ๐Ÿ“ฆ Create virtual environment & install dependencies
> This project was developed and tested with Python 3.8.8 โ€” we recommend using the same version for full compatibility and reproducibility.
```bash
# 1. Install Python 3.8.8 (only once)
pyenv install 3.8.8

# 2. Create virtual environment
pyenv virtualenv 3.8.8 neve

# 3. Activate the environment
pyenv activate neve

# 4. Install dependencies
pip install -r requirements.txt
```

#### ๐Ÿš€ Run training
```bash
cd src
python classification.py
```

### ๐Ÿณ Option B โ€” Run with Docker
You can also use Docker for full environment reproducibility.

#### ๐Ÿ—๏ธ Build Docker images and push to remote registry
The `build.sh` script automates the build of all Docker images and pushes them to the configured remote Docker registry.

Before running, make sure to edit `build.sh` to set your remote registry URL and credentials if needed.

Run:
```bash
bash build.sh
```
This will build the following Docker images:
- `neve:base` (default container for training and experiments)
- `neve:python` (base Python environment)
- `neve:sweep` (for hyperparameter sweep experiments)

#### ๐Ÿš€ Run training inside the container
```bash
docker run --rm -it \
--gpus all \ # Optional: remove if no GPU
neve:python classification.py # Optional: Optional parameters...
```
> ๐Ÿ’ก Note: you may need to adjust volume mounting (-v) depending on your OS and Docker setup.

---

## ๐Ÿ“Š Datasets
Tested datasets:
- [CIFAR10, and CIFAR100](https://www.cs.toronto.edu/~kriz/cifar.html)
- [Imagenet-100](https://www.image-net.org/challenges/LSVRC/2012/) (must be downloaded separately and prepared in the standard folder format.)

---

## ๐Ÿชช License
This project is licensed under the **GNU General Public License v3.0**.
See the [LICENSE](./LICENSE) file for details.

โžก๏ธ You are free to use, modify, and distribute this code under the same license terms.
Any derivative work must also be distributed under the GNU GPL.

---

## ๐Ÿ™Œ Acknowledgments
This research was developed at the University of Turin (UniTO), within the [EIDOS Lab](https://www.di.unito.it/~eidos/), and Tรฉlรฉcom Paris.

We thank the members of both institutions for the insightful discussions and support during the development of this work.

---

## ๐Ÿ“œ Citation
If you use this repository or find our work helpful, please cite:
```bibtex
@misc{dalmasso2025neve,
title = {Neural Velocity for Hyperparameter Tuning},
author = {Gianluca Dalmasso and Others},
year = {2025},
howpublished = {\url{https://arxiv.org/abs/xxxx.xxxxx}},
note = {Accepted at IJCNN 2025. Official citation will be updated upon publication.}
}
```

---

## ๐Ÿ“ซ Contact
For questions or collaborations, feel free to reach out:
- ๐Ÿ“ง gianluca.dalmasso@unito.it
- ๐Ÿ™ GitHub Issues for bugs or feature requests