Paper presented in the
Practical Applications of Agents and Multiagent Systems Ciobnference (PAAMS '23). An algorithm for distributed federated learning that uses consensus in a network to buid an aggregated mode sharing weights and bias with direct neighbors
AWS Community Day CPH - Three problems of Terraform
GTG-CoL: A Decentralized Federated Learning Based on Consensus for Dynamic Networks
1. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
GTG-CoL: A Decentralized Fed. Learning Based
on Consensus for Dynamic Networks
M. Rebollo J. Rincón L. Hernández
F. Enguix C. Carrascosa
VRAIN. Valencian Research Inst. for AI
Univ. Politècnica de València (Spain)
Practical Applications of Agents and Multiagent Systems
Guimarães 2023
c b a
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
2. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Problem
Goal
Distributed federated learning (FL) for agents in rural areas, with
connectivity issues
Previous work:
FL using consensus
Study of best network architecture -¿ GTG
Contribution:
Extension to dynamic networks
Integration into FIVE (virtual env.)
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
3. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Federated Learning
Brendan McMahan and Daniel Ramage. Federated Learning: Collaborative Machine Learning without Centralized
Training Data. Google Research, 2017
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
4. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Consensus Process in Networks
Process to share information on a
network, ruled by
xi (t+1) = xi (t)+ε
X
j∈Ni
[xj(t) − xi (t)]
Information from direct neighbors
only 0 5 10 15 20 25
#iter
0.2
0.3
0.4
0.5
0.6
0.7
0.8
x
i
Synchronous Consensus
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
5. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Federated Learning by Consensus
n identical agents
No central server
Certain degree of
parallelization
Reduces communication
overload (depending on
topology)
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
6. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Co-Learning Algorithm
1: for f ← 1, e do
2: W ← Train(f )
3: end for
4: Xi (0) ← Wj
5: for t ← 1, c do
6: Receive Xj(t) from ai neighbors
7: Xi (t + 1) ← Xi (t) + ε
P
j∈Ni
[Xj(t) − Xi (t)]
8: Send Xi (t + 1) to ai neighbors
9: end for
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
7. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Dynamic Networks
network topology does not affect the result, but to the
convergence speed
moving agents
agents linked to nearby neighbors
convergence guaranteed for switching topologies (Olfati, 2007)
study during hyperperiod
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 20 40 60 80 100 120 140 160 180 200
time
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
pos
Speed
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
8. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Test 1: One Orchard
All agents moving in the same direction
At least, one neighbor
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
9. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Test 2: Two Perpendicular Orchards
Adjacent fields with different directions
Some agents act as bridges
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
10. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Test 3: Two Orchards + Free Agent
Additional agent following a random walk (e.g. a drone)
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
11. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Network Characterization
degree: the higher, the higher communication overload
path length: the longer, the slower convergence for consensus
0 0.2 0.4 0.6 0.8 1
1
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
path
length
1
2
3
4
5
6
7
8
9
degree
One orchard
0 0.2 0.4 0.6 0.8 1
1
0.5
1
1.5
2
2.5
3
3.5
path
length
0
2
4
6
8
10
12
14
16
18
20
degree
Two perpendicular orchards
0 0.2 0.4 0.6 0.8 1
1
0
0.5
1
1.5
2
2.5
3
path
length
0
1
2
3
4
5
6
7
degree
Two orchards plus dron
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
12. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Network Efficiency
How robust the network is when agents fail
random failure: similar efficiency
deliberate attack: sensitive to hubs
0 5 10 15 20 25
#removed
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
E/EG
Efficiency under random failures
test1
test2
test3
0 5 10 15 20 25
#removed
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
E/EG
Efficiency under targeted attack (degree)
test1
test2
test3
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
13. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
FIVE Architecture
FIVE: Flexible Intelligent
Virtual Environment
SPADE agents + Unity
all the SPADE agents
have a counterpart in
FIVE managing the avatar
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
14. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Environment Design
Based on text files (easily
configurable)
map.txt: with elements as
letters
map config: general
aspect of the items
map.json: unique
elements
configuration:
FIVE-SPADE agents
connection
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
15. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
A Simulation of Fruit Orchard Smart Areas
agents control tractors moving through fruit orchards
they can communicate with other agents depending on this
range
tractor 2: double speed + lane changes
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
16. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
FIVE simulation (cenital)
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
17. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
FIVE simulation (3D)
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
18. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Analytical Results
hyperperiod t = 126
two stable teams + agent as a bridge
consensus convergence in steps
0 50 100 150 200 250 300
epoch
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
x
i
Consensus Evolution
t=126
t=252
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus
19. Introduction Co-Learning Network Characterization Digital Twin with FIVE Case Study Conclusions
Conclusions
Distributed Federated Learning using consensus
Adapted to dynamic networks. Geographical Threshold Graph
Characterization of the generated networks: communication
overload and failure tolerance
Integrated into a 3D simulator (FIVE)
Work in progress:
environment generation from aerial pictures
@mrebollo vRAIN-UPV
GTG-CoL: A new DFL based on Consensus