This repository contains the code associated with the paper:
"Leveraging Over-Parameterization to Improve the Verifiability of Neural Networks" (IJCAI 2026).
This repository provides:
- Training scripts for different neural network architectures (SH, CV, CX, CF).
- Support for MNIST, Fashion-MNIST, and CIFAR datasets pre-filtered from a ResNet18.
- Ability to train networks under over-parameterization regime with or without regularization (
rs_loss) (BTP and NSP). - Scripts to generate VNNLIB properties for local robustness verification.
All experiments can be run inside a Docker container to ensure reproducibility.
From the root of the repository:
docker build -t ijcai_image .Mount your local repo or datasets folder if needed:
docker run -it -v /path/to/local/repo:/app --gpus all ijcai_imageIs is strongly advised to use the --gpus all flag and ensure that your GPU is visible inside the container. Cuda acceleration is required.
Run the entrypoint:
./docker-entrypoint.shInside the container, navigate to:
cd /app/Generators/ArchitecturesGeneratorYou can train SH, CV, CF, or CX architectures, either with regularization (rs_loss) or without.
Train with rs_loss regularization:
python train_SH.py --dataset MNIST|FMNIST --rs_loss_bool --hidden_dim (to be specified)
python train_CX.py --dataset MNIST|FMNIST --rs_loss_bool --hidden_dim (to be specified)
python train_CV.py --dataset MNIST|FMNIST --rs_loss_bool --hidden_dim (to be specified)Train baseline architectures without regularization:
python train_SH.py --dataset MNIST|FMNIST --skip_binary_search --hidden_dim (to be specified)
python train_CX.py --dataset MNIST|FMNIST --skip_binary_search --hidden_dim (to be specified)
python train_CV.py --dataset MNIST|FMNIST --skip_binary_search --hidden_dim (to be specified)
After --hidden_dim, specify the number of hidden units in the neural network(s) you want to train.
To replicate the experiments reported in the paper, the following values were used for each architecture and dataset.
Different values can be provided to perform additional experiments.
Hidden Units Used in the Paper
| Architecture | Dataset | --hidden_dim values |
|---|---|---|
| SH | MNIST | 30, 100, 200, 500, 1000, 2000, 4000, 8000 |
| CX | MNIST, FMNIST | 50, 100, 250, 500, 1000 |
| CV | MNIST | 5, 15, 25, 50, 100, 200, 500 |
| CV | FMNIST | 15, 25, 50, 100, 200, 500 |
| CF | CIFAR (Custom) | 32, 64, 256, 512, 1024 |
Train with rs_loss:
python train_CF.py --rs_loss_boolTrain baseline architecture without regularization:
python train_CF.py --skip_binary_searchReplace
SH,CV,CX,CFwith the architecture you want to train.
Results are saved in /app/Generators/ArchitecturesGenerator/DATASET_NAME/regularized_models or not_regularized_models
To generate local robustness properties:
cd /app/Generators/PropertyGeneratorpython generate_vnnlib_properties.py
python generate_vnnlib_properties_cifar.pyProperties are saved in /app/Generators/PropertyGenerator/results
- This script generates
.vnnlibfiles for the CIFAR_CUSTOM10 dataset. - By default, it generates 100 properties.
Given the significant computational time required to train all architectures, we provide the trained models used in the paper at the following link: https://drive.google.com/drive/folders/1WwTIEEOz9FEcLgCcn9ST9UZV7Owb-9PU
We also provide the CIFAR-10 dataset extracted using a pre-trained ResNet18 model, along with the ResNet18 model itself, used for the CIFAR-10 experiments. The dataset consists of two CSV files, which should be placed in datasets/CUSTOM_CIFAR10/. Training can then be performed by running train_CF.py.
- All scripts are configured to run inside the Docker container.
- Python environment and dependencies are installed via Conda inside the container.