This repository contains the slim code release for the FedCVESA v5 experiments used in the paper draft. The retained experiment setting is the 10-client Dirichlet non-IID split with alpha=0.5 on MNIST, Fashion-MNIST, and CIFAR-10.
src/federated_main.py: main federated training and CVEA recovery entrypoint.src/models.py: only the v5 paper models:CNNFashion_Enhancedfor MNIST and Fashion-MNIST.ResNet18Cifarfor CIFAR-10.
src/options.py: CLI options used by the v5 experiments.src/update.py,src/utils.py,src/sampling.py,src/attack_utils.py,src/plot.py: client training, partitioning, aggregation, attack, and plotting helpers.scripts_10clients/run_all_rank10_dirichlet05.sh: final v5 reproduction script.
Datasets, logs, .npy metrics, checkpoints, generated recovery images, paper figures, result summaries, and historical ablation scripts are intentionally not included.
Install dependencies from the repository root:
pip install -r requirments.txtThe dependency filename is kept as requirments.txt to match the original project. Datasets are downloaded by torchvision into data/ when an experiment first runs.
Syntax check:
python -m compileall srcSmall CPU sanity run:
python src/federated_main.py \
--dataset=mnist \
--model=cnn \
--epochs=1 \
--num_users=10 \
--frac=1.0 \
--iid=0 \
--noniid_mode=dirichlet \
--dirichlet_alpha=0.5 \
--dirichlet_min_size=100 \
--gama=0.5 \
--num_steal=5 \
--num_img_per_client=1 \
--agg_mode=segmented \
--attack_position_mode=spreadPreview the 57 jobs without running them:
DRY_RUN=1 bash scripts_10clients/run_all_rank10_dirichlet05.shRun all v5 jobs:
GPU_LIST="0 1 2 3 4 5 6 7" bash scripts_10clients/run_all_rank10_dirichlet05.shThe script defaults to:
--num_users=10 --frac=1.0 --iid=0
--noniid_mode=dirichlet --dirichlet_alpha=0.5 --dirichlet_min_size=100
--gama_warmup_epochs=0 --lr_scheduler=cosine --min_lr=0.0001
MNIST/Fashion-MNIST: model=cnn, lr=0.01, local_ep=10, local_bs=16
CIFAR-10: model=resnet18_cifar, lr=0.03, local_ep=1, local_bs=64, cifar_crop_size=32, cifar_normalize=1
Outputs are generated under save/results, save/plots, save/objects, and scripts_10clients/logs_rank10_dirichlet05; these paths are ignored by git.