This repository contains the experimental scripts for a manuscript on client-private channel perturbation in CNN-based split federated learning. The method combines a private perturbation with a private bridge module so that the server-side model does not directly observe a client-aligned smashed representation.
The code was developed and run in Google Colab with the default Colab Python environment and a T4 GPU. The scripts are intentionally kept compact and correspond to the experiments reported in the paper.
| File | Purpose |
|---|---|
sanity_shuffled_bridge.py |
Main ResNet-18 split federated learning experiments across datasets. |
sanity_shuffled_bridge_vgg11bn.py |
Cross-architecture experiments with VGG11-BN. |
sanity_shuffled_bridge_mobilenetv2.py |
Cross-architecture experiments with MobileNetV2. |
plot_comm_overhead_panel.py |
Communication-overhead figure generation from finished JSON result files. |
- Platform: Google Colab default environment
- GPU: NVIDIA T4
- Framework: PyTorch / torchvision
- Datasets: CIFAR-10, CIFAR-100, SVHN, and PathMNIST
- Backbones: ResNet-18, VGG11-BN, and MobileNetV2
- Split federated setting: 20 clients, 10 clients per round, Dirichlet non-IID partition with alpha = 0.3
- Main private mechanism:
--defense shuffled_bridge --shuffled_bridge_cut A
The reconstruction attack results use two paper-aligned scenarios:
- Scenario A: private perturbation unknown to the attacker
- Scenario B: private perturbation known to the attacker
Baselines without private perturbation are reported as baseline_reconstruction.
In Colab, clone the repository and install the extra dependencies:
git clone https://github.com/EpiphanyMoment/split-sfl-channel-perturbation.git
cd split-sfl-channel-perturbation
pip install -r requirements.txtColab already provides PyTorch and torchvision. The requirements file also lists them for local reproduction.
Run the main ResNet-18 method on CIFAR-10:
python sanity_shuffled_bridge.py \
--dataset cifar10 \
--experiment_preset main20 \
--defense shuffled_bridge \
--shuffled_bridge_cut A \
--stage bothRun baseline methods by changing --defense:
python sanity_shuffled_bridge.py --dataset cifar10 --experiment_preset main20 --defense none --stage both
python sanity_shuffled_bridge.py --dataset cifar10 --experiment_preset main20 --defense bottleneck --public_channels 24 --stage both
python sanity_shuffled_bridge.py --dataset cifar10 --experiment_preset main20 --defense pm --pm_group_size 4 --pm_init_prob 0.7 --stage both
python sanity_shuffled_bridge.py --dataset cifar10 --experiment_preset main20 --defense gaussian --noise_sigma 4 --stage bothRun the cross-architecture experiments:
python sanity_shuffled_bridge_vgg11bn.py --dataset cifar10 --defense shuffled_bridge --stage both
python sanity_shuffled_bridge_mobilenetv2.py --dataset cifar10 --defense shuffled_bridge --stage bothGenerate the communication-overhead panel after the result JSON files are available:
python plot_comm_overhead_panel.py \
--project_root . \
--out_dir ./results_comm_overhead- Dataset files, trained checkpoints, result JSON files, reconstruction images, and generated figures are not included in this repository.
- PathMNIST requires the
medmnistpackage. For final PathMNIST runs, pass the same normalization statistics used in the paper experiments via--norm_jsonwhen available. - LPIPS is optional at runtime. If the
lpipspackage is unavailable, the scripts skip LPIPS and keep the other reconstruction metrics.
This project is released under the MIT License.