Skip to content

Commit 8325917

Browse files
committed
Initial commit
0 parents  commit 8325917

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

README.md

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Private Collaborative Edge Inference via Over-the-Air Computation (TMLCN) [\[arXiv\]](https://arxiv.org/abs/2407.21151) [\[IEEE\]](https://ieeexplore.ieee.org/abstract/document/10829586)
2+
3+
This repository contains the implementation of the paper "Private Collaborative Edge Inference via Over-the-Air Computation".
4+
5+
![Overview](figures/overview.png)
6+
7+
## Citation
8+
Please cite the paper if this code or paper has been useful to you:
9+
```
10+
@article{yilmaz2025private,
11+
title={Private Collaborative Edge Inference via Over-the-Air Computation},
12+
author={Yilmaz, Selim F and Has{\i}rc{\i}o, Burak and Qiao, Li and G{\"u}nd{\"u}z, Deniz and others},
13+
journal={IEEE Transactions on Machine Learning in Communications and Networking},
14+
year={2025},
15+
publisher={IEEE}
16+
}
17+
```
18+
19+
## Abstract
20+
We consider collaborative inference at the wireless edge, where each client's model is trained independently on its local dataset. Clients are queried in parallel to make an accurate decision collaboratively. In addition to maximizing the inference accuracy, we also want to ensure the privacy of local models. To this end, we leverage the superposition property of the multiple access channel to implement bandwidth-efficient multi-user inference methods. We propose different methods for ensemble and multi-view classification that exploit over-the-air computation (OAC). We show that these schemes perform better than their orthogonal counterparts with statistically significant differences while using fewer resources and providing privacy guarantees. We also provide experimental results verifying the benefits of the proposed OAC approach to multi-user inference, and perform an ablation study to demonstrate the effectiveness of our design choices. We share the source code of the framework publicly on Github to facilitate further research and reproducibility.
21+
22+
## Installation
23+
1. Install conda and torch manually (recommended).
24+
2. Run `pip install -r requirements.txt`.
25+
26+
## Running
27+
1. Train and cache the device models.
28+
2. Generate figures, tables, or run raw experiments.
29+
30+
## Training CV Models
31+
```sh
32+
python train.py --data <data_name> --num_repeats 10 --num_devices 20 --num_epochs 50
33+
```
34+
- `<data_name>` can be `cifar10`, `fashionmnist`, `mnist`, `cifar100`, `food101`, `stanfordcars`, `dtd`, `country211`, `flowers102`, `oxford3tpets`, `multiview_oxford3tpet`
35+
36+
## Training NLP Models
37+
```sh
38+
python nlp_train.py --data <data_name> --num_repeats 10 --num_devices 20
39+
```
40+
- `<data_name>` can be `yelp_review_full`, `yelp_polarity`, `imdb`, `emotion`.
41+
42+
## Running an Experiment
43+
- See the bottom of `main.py`.
44+
45+
## Generating TeX Code for the Comparison Table
46+
To generate the TeX code for the comparison table, run the following script:
47+
```sh
48+
python figure_comparison_table.py
49+
```
50+
51+
## Generating TeX Code for the Varying Conditions pgfplot
52+
To generate the TeX code for varying conditions using pgfplot, run the following script:
53+
```sh
54+
python figure_conditions.py
55+
```
56+
57+
## Generating TeX Code for Privacy Quantities
58+
To generate the TeX code for privacy quantities, run the following script:
59+
```sh
60+
python figure_privacy_quantities.py
61+
```
62+
63+
## Generating TeX Code for Projection Ablation
64+
To generate the TeX code for projection ablation, run the following script:
65+
```sh
66+
python figure_projection_ablation.py
67+
```
68+
69+
## Generating TeX Code for Number of Users Ablation
70+
To generate the TeX code for the number of users ablation, run the following script:
71+
```sh
72+
python figure_numusers_ablation.py
73+
```
74+
75+
## Generating TeX Code for Nemenyi Test
76+
To generate the TeX code for the Nemenyi test, run the following script:
77+
```sh
78+
python nemenyi/nemenyi.py figures/comparison_private.csv figures/figure_nemenyi_private.tex --h
79+
python nemenyi/nemenyi.py figures/comparison_non_private.csv figures/figure_nemenyi_non_private.tex --h
80+
python nemenyi/nemenyi.py figures/comparison_weak_private.csv figures/figure_nemenyi_weak_private.tex --h
81+
```
82+
83+
## Generating All Figures
84+
You can generate all figures by running the following script:
85+
```sh
86+
sh all_figures.sh
87+
```
88+
89+
## Results
90+
![Results](figures/results.png)

0 commit comments

Comments
 (0)