Non-IID
DataSetModel 2Model 1++Model 1Model 2

train

train

0 1 1 1 4
2 1 1 1 6
3 1 1 1 8

Node 1encounteraggregate

New
Model

aggregate

Wireless Ad Hoc Federated Learning:
A Fully Distributed Collaborative Machine Learning

0 2 2 2 5
1 2 2 2 7
3 2 2 2 9

New
Model

Non-IID
DataSetNode 2

Associate Professor, Hideya Ochiai, Ph.D.,
The University of Tokyo, Japan1

Table of Contents• Decentralization of Machine Learning• Wireless Ad Hoc Federated Learning (WAFL)• Characteristics• Theory• Benchmark Evaluation• Application• Future Research Directions• Conclusion
2

Table of Contents• Decentralization of Machine Learning• Wireless Ad Hoc Federated Learning (WAFL)• Characteristics• Theory• Benchmark Evaluation• Application• Future Research Directions• Conclusion3

<< Background >>Machine Learning was Server-Centric and Data-Oriented.
1. They collected data to a server,
2. They formed Big Data,
3. They trained ML models
in their server internally.
ML is good at Image processing, Speech recognition, etc.
Their interest was Data.
The Internet was just a platform for collecting data.

4

<< Background >>Federated Learning: Collaborative Machine Learning without Centralized Training Data
https://ai.googleblog.com/2017/04/federated-learning-collaborative.html

Emergence of Federated Learning (2017 – by Google, etc.)
Privacy Regulations (e.g., GDPR in Europe) motivatedthe emergence of Federated Learning (FL) which allows
machine learning without collecting user data.

Point 2: FL can aggregate ML models

Point 1: without exchanging user data

However, this is still a Server-Client system!! (which is Centralized)➔ Let’s fully decentralize the system.
5

Toward Wireless Ad Hoc Federated Learning (WAFL)
Server-Client Architecture ➔ Peer-to-Peer Architecture
1. Each node individually trains
its ML model using its local data.

2. Each node encounters the other.

Data

Data

3. They can communicate with local
wireless communication media
such as Wi-Fi Ad Hoc modeor Bluetooth

6

Toward Wireless Ad Hoc Federated Learning (WAFL)
Server-Client Architecture ➔ Peer-to-Peer Architecture
1. Each node individually trains
its ML model using its local data.
2. Each node encounters the other.
3. They can communicate with local
wireless communication media
such as Wi-Fi Ad Hoc modeor Bluetooth
4. They exchange and aggregate
the models to develop a new model.
5. This enables collaborative training.
7

Non-IID
DataSetModel 2Model 1++Model 1Model 2

train

train

0 1 1 1 4
2 1 1 1 6
3 1 1 1 8

Node 1A larger amount ofLabel 1 records

encounteraggregate

New
Model

aggregate

Why nodes should collaborate?

0 2 2 2 5
1 2 2 2 7
3 2 2 2 9

New
Model

Non-IID
DataSetNode 2A larger amount ofLabel 2 records

1. Distribution of data on a node is not the same.
e.g.,- Noodle lovers may have a lot of noodles photos.
- Railway lovers may have a lot of railway photos.

This is called Non-IID.
(Not Independent and Identically Distributed)
2. If the training dataset is non-IID, the trained model
will not be generalized for prediction.
e.g., A noodle lovers device may recognize
the photo of railway as noodle.

3. Mixture of the models will allow the generalizationof model.

Hideya Ochiai et. al., “Wireless Ad Hoc Federated Learning – A Fully Distributed Cooperative Machine Learning”, arXiv, 2022.

8

Wireless Ad Hoc Federated Learning (WAFL)

Encountering many nodes leads to generalization of the model.
Node 1

Node 2

Node 3

Node 4

1 1 1
1 1 1
1 1 1
2 3 4
Data Set

2 2 2
2 2 2
2 2 2
1 3 4
Data Set

3 3 3
3 3 3
3 3 3
1 2 4
Data Set

Model Exchange
andAggregation
Model

Learning is Biased.

ModelContact Area
4 4 4
4 4 4
4 4 4
1 2 3
Data Set

Model

Model

1 1 1
1 1 1
1 1 1
2 3 4
Data Set

Model

All the models
are aggregated.

Model

4 4 4
4 4 4
4 4 4
1 2 3
Data Set

1 1 1
1 1 1
1 1 1
2 3 4
Data Set

Trajectory of Node 1

ModelContact Area

Contact Area

Model Exchange
andAggregation

Model mixture with encounter

Model Exchange
andAggregation

Trajectory of Node 4

Model is generalized9

Table of Contents• Decentralization of Machine Learning• Wireless Ad Hoc Federated Learning (WAFL)• Characteristics• Theory• Benchmark Evaluation• Application• Future Research Directions• Conclusion
10Characteristics of Wireless Ad Hoc Federated Learning (WAFL)
1. No third-party (or broker) mechanisms• Learning among peers without any third-party intervention.

2. No power structure• In Server-Client architecture, the service provider has the power.
• Server-Client architecture can lead to a Master-Slave structure.
• Every node is flat in Peer-to-Peer systems.

3. WAFL can realize multi-vendor scenarios• Anyone can join the system if collaboration protocols are defined.
11

Non-IID
DataSetModel 2Model 1++Model 1Model 2

train

train

0 1 1 1 4
2 1 1 1 6
3 1 1 1 8

Node 1encounteraggregate

New
Model

aggregate

Theoretical Aspects ofWireless Ad Hoc Federated Learning

0 2 2 2 5
1 2 2 2 7
3 2 2 2 9

Node 2New
Model

Non-IID
DataSet12

Review of Machine Learning Mechanism in General𝑥, 𝑦 ∈ 𝐷𝑦𝑥𝑦ො = 𝑓(𝑥, 𝜃)

loss

𝑦

𝜃ҧ ≅ argmin𝜃

σ𝑥,𝑦 ∈𝐷 𝑙𝑜𝑠𝑠(𝑓 𝑥, 𝜃 , 𝑦)𝐷

By using the optimized 𝜃 …

𝑥

𝜃

𝑦ො

loss

𝑦

ML adjusts the θ so that the loss is minimized for the entire D.

𝜃 ←𝜃−𝜂∇σ𝑥,𝑦 ∈𝐷 𝑙𝑜𝑠𝑠(𝑓 𝑥, 𝜃 , 𝑦)𝐷(*) θ denotes a set of model parameters

𝜃ҧ

𝑥

𝑦ො

ML predicts proper 𝑦 for 𝑥 with enough accuracy.

𝜃ҧ

3

𝜃ҧ

If it hits 100 out of 100, the accuracy is 100%.
If it hits 95 out of 100, the accuracy is 95%. 13

6The learning algorithm of WAFL
0. Physical encounterment

4. Repeat𝑥

Node A𝜃𝐴𝑦ො

Node B𝑥

Dataset: 𝐷 𝐵
Model parameters: 𝜃 𝐵

𝜃𝐵

𝑦ො

𝐵

𝜃𝐴

2. Aggregation

2. Aggregation

𝜃
𝐴

𝜃 +𝜃
𝜃 ←
2

𝐵
𝐴
𝜃
+
𝜃
𝜃𝐵 ←
2

𝐵

𝐴

3. Adjustment

3. Adjustment
𝐴𝐴𝜃 ←𝜃 −𝜂∇

4. Repeat

Dataset: 𝐷 𝐴
Model parameters: 𝜃 𝐴

σ𝑥,𝑦 ∈𝐷𝐴 𝑙𝑜𝑠𝑠(𝑓 𝑥, 𝜃
𝐷𝐴

𝐴

, 𝑦)

𝜃𝐵 ← 𝜃𝐵 − 𝜂 ∇σ𝑥,𝑦 ∈𝐷𝐵 𝑙𝑜𝑠𝑠(𝑓 𝑥, 𝜃 𝐵 , 𝑦)𝐷𝐵

14How WAFL allows collaborative training (1/4)：

Loss

The Case of Individual Training at Node A

Model parameters will moveto the θ that minimizes the loss
in Valley & Basin structure

Minimized for 𝐷 𝐴

ModelParameter15𝜃How WAFL allows collaborative training (2/4)：

Loss

The Case of Individual Training at Node B

If the distribution of
the dataset is different,
the minimum location
is different.

Minimized for 𝐷 𝐵

ModelParameter16𝜃How WAFL allows collaborative training (3/4)：
Loss

Not fully generalized without model aggregation

Minimized for 𝐷 𝐵

2. Minimum point for DB
is optimized for Node B,
but not for Node A (DA ).

Minimized for 𝐷 𝐴

1. Minimum point for DA
is optimized for Node A,
but not for Node B (DB ).

ModelParameter17𝜃How WAFL allows collaborative training (4/4)：

Aggregation finds an optimal model𝜃 for Node A and B

Minimized for 𝐷 𝐵➔ This search for the optimal
point for both nodes.

Minimized
for 𝐷 𝐴 ∪ 𝐷𝐵

attracts encountered models
with each other in theparameter space θ.

Minimized for 𝐷 𝐴

𝐴
𝐵
𝜃
+
𝜃
𝜃𝐴 ←
2

Loss

The model aggregation,

Model
Parameter18𝜃WAFLで学習が成立する仕組み(5/5)：

収束の様子・・・２次元での考察
D𝐴 ∪ D𝐵 のLossの盆地

モデルの合成結果
𝐴
𝐵
𝜃
+
𝜃
𝜃𝐴 ←
2

は必ずしも、盆地内にあるとは限らない
その後行われる調整、𝐴𝐴𝜃 ←𝜃 −𝜂∇σ𝑥,𝑦 ∈𝐷𝐴 𝑙𝑜𝑠𝑠(𝑓 𝑥, 𝜃 𝐴 , 𝑦)𝐷𝐴によって、盆地内に引き戻される。

繰り返し行うことによって、双方の共通の盆地にたどり着く𝜃𝐴

𝜃 𝐴 + 𝜃𝐵
2

D𝐴 のLossの盆地

𝜃𝐵

D𝐵 のLossの盆地

19

Table of Contents• Decentralization of Machine Learning• Wireless Ad Hoc Federated Learning (WAFL)• Characteristics• Theory• Benchmark Evaluation• Application• Future Research Directions• Conclusion
20

A Demonstration ofWireless Ad Hoc Federated Learningwith Benchmark Evaluation21

Benchmark Evaluation• Why benchmark evaluation ?
• For reproducibility, and standard• For understanding the technical characteristics• ML model: Multilayer Perceptron (MLP)• Dataset: MNISTYann et.al., THE MNIST DATABASE of handwritten digits, 1998.
http://yann.lecun.com/exdb/mnist/• Mobility Pattern• Static: 4 topologies• Dynamic Case 1: 3 Random Waypoint Mobility (RWP)• Dynamic Case 2: 3 Community-Structured Environment (CSE)• Simulation• We carried out the experiment by simulation on a single computer.
22

Random Waypoint Mobility

Benchmark Evaluation: Experiment Setting

90% Non-IID MNIST Dataset■ Training Data Distribution

90% of Node n’s samples are label n samples.

■ Testing Data Distribution
All the labels appear with equal probability – which is independent and identically distributed (IID)
We used the standard MNIST testing dataset.
23

Benchmark Evaluation: Experiment Setting𝑥

ReLU
Flatten2-layer fully-connected neural networks (FC-NNs)

Linear10128Linear

128

784

MLP for ML model

2

𝑦

2

𝑦ො
Cross Entropy Loss
Adam Optimizer
Learning rate 0.001
Coefficient of Aggregation 1.0
24

Benchmark Evaluation
1. Evaluation on Static Network Topologies• If nodes are statically
deployed, e.g., in wirelesssensor network scenarios,
the network topology
becomes static.

static_line

static_tree• We carried out WAFL
assuming the four network
topologies.

static_ringstar static_dense25Benchmark Evaluation
Changes of Confusion Matrices to the Testing Data
Case of static_line

Epoch 200

Epoch 5000

static_line

Epoch 1

Example @Node 9

In the beginning, many testing records
were misclassified into 9.
E.g., True 4 was misclassified into 9. True 7 was 9.

Finally, misclassifications weredrastically reduced.
26

Benchmark Evaluation

Accuracy Trend (Static Network Topologies)
WAFL has achieved almost
the same performanceas conventional federated
learning.
10.0-11.5% Improvement
Accuracy of Self-Train(*) Fluctuations were caused by “Optimizer Adam”
27Benchmark Evaluation

2. Evaluation on Dynamic Network Topologies
c0
Node 0c2
c1

Random Waypoint Mobility(RWP)

Node 2

Node 1

Community-Structured Environment
(CSE)
28

Benchmark Evaluation
Change of Confusion Matrices to the Testing Data
Epoch 200

Epoch 5000

RWP, CSE@Node 9rwp0500

Epoch 1

cse02

Misclassifications
were drasticallyreduced.

29

Table of Contents• Decentralization of Machine Learning• Wireless Ad Hoc Federated Learning (WAFL)• Characteristics• Theory• Benchmark Evaluation• Application• Future Research Directions• Conclusion
32

Applications ofWireless Ad Hoc Federated Learning
PurpleApple

走る (正常)空振り (正常)Big

打撃 (正常)MT-WAFL

アタック (正常)走る (正常)レシーブ (正常)交通事故に遭う (異常)1. Labeling by their own perspective

山で滑落する (異常)2. Model mixture by MT-WAFL
Apple

加速度センサ

加速度センサSmart watch

Smart watch

PurpleBig

3. Multi-Task Execution(1) Self-Localization(2) Brainstormer(3) Anomaly Detection33

Collaborative Training for Self-Localization with WAFL
1. Self-localization with observed Wi-Fi AP’s RSSI

2. Problems in the previous studies
We had to collect RSSI list at all the locations for training.
3. WAFL allows model development with(a) a node training around area 0,(b) another node training around area 9,(c) aggregating the developed models among them.

4. The aggregate model can predict the location at anywhere.
34

Sugizaki, Ochiai, and Esaki . "Wi-Fi の信号強度を用いた自律分散協調学習による広域自己位置推定." IEICE-Tech Report (MSS) 2022.17 (2022): 1-4.

Collaborative Training for Self-Localization with WAFL

Experiment Setting

Area Labels

Distribution of the training data @Node 8* Assumption
Single node in each area.
Each node communicate
only with neighbors.

Network Topology

35Collaborative Training for Self-Localization with WAFL

Node 8’s Location Prediction Example

Epoch 10Epoch 2000

At the beginning of training, the model predicted wrong location from observed RSSIs,
but finally, it could predict the location precisely.
36Integration of Multiple Perspectives by WAFL
Purple1. People in a team react in different
ways to a presented object, because
they have different perspectives
in their idea.

2. Integration of these perspectivesof team members will develop
the reaction model for the team.

Apple

Big

MT-WAFL

1. Labeling by their own perspective

2. Model mixture by MT-WAFL
Apple
PurpleBig

3. Multi-Task Execution
38

Integration of Multiple Perspectives by WAFL

Distribution of the Label ExistenceExperiment Setting
X: Rotated and Resized Fashion-MNIST Image
Y: Class of the object (0, 1, …, 9)
Z: Rotation of the object (0, 1, 2, 3)
W: Size of the object (0, 1)

5: SandalzyLabel Y

Label Z

Label W

Node 0-4

99%

1%

1%

Node 5-7

1%

99%

1%

Node 8-9

1%

1%

99%

y

z

w

(𝐴)
𝜃𝑦

(𝐴)
𝜃𝑍

(𝐴)
𝜃𝑤

1: +90°Rotateℎ0: No Resizex

Mobility: rwp0500

w

(𝐴)
𝜃ℎ

𝑥

39

Integration of Multiple Perspectives by WAFL

Node 8’s Predictions for Object Class, Rotation, and Size

Node 8 originally has many labels in Size(w) perspective.
As the training proceeds, misclassifications in Object Class and Rotation predictions have improved. 40

Feature Learning and Anomaly Detection with WAFL

Anomaly Detection in Non-IID Scenario

Local Anomaly(Anomaly for the node, but not for some others)

Node 0Node 1
Node 2
Node 3Global Anomaly Our target is “Global Anomaly”(Anomaly for all the nodes)

42

Feature Learning and Anomaly Detection with WAFL

To Detect a Global Anomaly
Encoder

Legitimate
Input

Anomaly
Input

Decoder

Autoencoder

Encoder“To precisely reconstruct
the legitimate inputs”,
WAFL-Autoencoder
should learn thelegitimate features.

Decoder

Output(Reconstruction)

WAFL-Autoencoder should
fail in reconstructing
a Global Anomaly input.

OutputAutoencoder (Reconstruction)

43

Feature Learning and Anomaly Detection with WAFL

Experiment SettingDistribution of Training Data (99.95% Non-IID)

Node
L0
L1
L2
L3
L4
L5
L6
L7
L8
L9
Node 0 4736
0
0
0
0
0
0
0
0
0
Node 1
0
5418
0
0
2
1
0
0
0
1
Node 2
0
0
4779
0
0
0
0
0
0
0
Node 3
1
0
0
4911
0
0
1
1
0
0
Node 4
0
0
0
1
4733
0
0
0
0
0
Node 5
0
0
0
0
0
4343
1
0
0
0
Node 6
0
0
0
1
0
0
4712
0
0
0
Node 7
1
0
1
0
1
0
2
5046
0
0
Node 8
1
0
0
0
0
0
1
0
4714
0
Node 9
0
0
0
0
0
0
0
0
1
4751

Total
4736
5422
4479
4914
4734
4344
4713
5051
4716
4752

For example, we expect the Autoencoder at Node 8 will give outputs as follows (if no WAFL).

Encoder

Legitimate Input

Decoder

Autoencoder

Output44

Mobility Model: rwp0500

Feature Learning and Anomaly Detection with WAFL

Reconstructions at Node 8 with WAFL
In case of Legitimate Inputs
1. WAFL (epoch 0 – after Self-Training)
the autoencoder gave 8 to any inputs 0 ～ 9.
2. As the WAFL training proceeds, WAFL’s model
aggregation allowed the precise reconstructionof all the legitimate samples (0 ～ 9).

45

Feature Learning and Anomaly Detection with WAFL

Reconstructions at Node 3 with WAFL
In case of Global Anomaly Inputs.
1. WAFL (epoch 0 – after Self-Training)
the autoencoder gave 3 to any global anomalies.

2. Even though the WAFL training proceeded,
the autoencoder did not reconstruct the
global anomaly input (which is succeeded).

46

Feature Learning and Anomaly Detection with WAFL

Anomaly Detection (@Node 0)
1. At Epoch 0 (after Self-Train)
many samples except 0 were recognized
as anomaly.
2. At Epoch 100, anomaly samples
were recognized as legitimate.
3. After Epoch 1000, it could recognize
legitimate or anomaly precisely(except Occluded-MNIST).

47

Table of Contents• Decentralization of Machine Learning• Wireless Ad Hoc Federated Learning (WAFL)• Characteristics• Theory• Benchmark Evaluation• Application• Future Research Directions• Conclusion
48

Open Research Questions (Open Issues)• MNIST is just a simple dataset ….
• How about general images or videos?
• How about text?
• How about audio?
• How about IoT or Industrial data?
• Can we combine with sensors?

• How about the logs of computers?
• Can we use for network security?

• How about Generative models (e.g., GAN)?
• How about Multi-Domain Adaptation (Out-of-Distribution) Issues?
• How about the security of WAFL?
• How about the implementation?
• How about the protocol for discovery and model exchange?
• How can we operate WAFL as a learning system?

49

Conclusion• A Fully Autonomous and Distributed Collaborative Machine Learning-- Wireless Ad Hoc Federated Learning (WAFL)• Characteristics of WAFL
• All the nodes are even – no centralized power mechanism.
• WAFL allows multi-vendor system if protocol is defined.

• Current Stage of Research• Benchmark-based evaluation in basic and application-oriented scenarios• Future Research Directions• Expansion into various applications• Implementation, operation, protocol design

We look for research partners.
50

Thank you very much
Node 1

Node 2

Node 3

Node 4

1 1 1
1 1 1
1 1 1
2 3 4
Data Set

2 2 2
2 2 2
2 2 2
1 3 4
Data Set

3 3 3
3 3 3
3 3 3
1 2 4
Data Set

Model Exchange
andAggregation
Model

Data Set

1 1 1
1 1 1
1 1 1
2 3 4
Data Set

Model

4 4 4
4 4 4
4 4 4
1 2 3
Data Set

Model

static_line

1 1 1
1 1 1
1 1 1
2 3 4
Data SetBig

1. Labeling by their own perspective

2. Model mixture by MT-WAFL
Apple

Model

All the models
are aggregated.

Model

4 4 4
4 4 4
4 4 4
1 2 3

Apple

MT-WAFL

Contact Area

Model

PurplePurpleBig

Trajectory of Node 1

ModelContact Area

Contact Area

Model Exchange
andAggregation

3. Multi-Task Execution

Model Exchange
andAggregation

Trajectory of Node 4

static_tree

static_ringstar static_dense2451