1
Federated Learning Can Find Friends �That Are Advantageous �and Help with Low-Resource Machine Translation
Eduard Gorbunov
MBZUAI
October 16, 2024
Federated Learning One-World Seminar
2
Outline
3
Federated Learning
4
The Problem
model parameters
# of parameters
. . .
5
The Problem
model parameters
# of parameters
# of workers/clients
. . .
6
The Problem
model parameters
# of parameters
# of workers/clients
. . .
7
The Problem
model parameters
# of parameters
# of workers/clients
. . .
Key features:
8
Parallel SGD
. . .
9
Parallel SGD
. . .
10
Parallel SGD
. . .
11
Parallel SGD: (Some) Good Properties
12
Federated Learning�with a Target Client
13
Samuel Horváth�Assistant Professor �MBZUAI
N. Tupitsa, S. Horváth, M. Takáč, E. Gorbunov. Federated Learning Can Find Friends That Are Advantageous (arXiv:2402.05050)
Martin Takáč�Associate Professor �MBZUAI
Nazarii Tupitsa�Research Assistant �MBZUAI
14
Federated Learning with a Target Client
Standard Federated Learning
15
Federated Learning with a Target Client
Standard Federated Learning
Federated Learning with a Target Client
16
Federated Learning with a Target Client
Standard Federated Learning
Federated Learning with a Target Client
17
Federated Learning with a Target Client
Standard Federated Learning
Federated Learning with a Target Client
18
Federated Learning with a Target Client
Standard Federated Learning
Personalized Federated Learning
Federated Learning with a Target Client
19
Is Parallel SGD Good for FL with a Target Client?
Parallel SGD:
, where
20
Is Parallel SGD Good for FL with a Target Client?
Parallel SGD:
, where
21
Is Parallel SGD Good for FL with a Target Client?
Parallel SGD:
, where
22
Is Parallel SGD Good for FL with a Target Client?
Parallel SGD:
, where
23
Naive Approach
Use target’s client data only:
24
Naive Approach
Use target’s client data only:
25
Non-Implementable Approach
Use data from clients with the same data distribution:
26
Non-Implementable Approach
Use data from clients with the same data distribution:
subset of clients with�the same data distribution�as for the target client
27
Non-Implementable Approach
Use data from clients with the same data distribution:
subset of clients with�the same data distribution�as for the target client
28
Non-Implementable Approach
Use data from clients with the same data distribution:
subset of clients with�the same data distribution�as for the target client
29
New Method: MeritFed
30
New Method: MeritFed
aggregation weights
31
New Method: MeritFed
aggregation weights
32
New Method: MeritFed
aggregation weights
probability simplex
33
New Method: MeritFed
aggregation weights
How to solve the above auxiliary problem?
probability simplex
34
MeritFed: How to Solve Auxiliary Problem
Approach 1: use fresh data (if one can get fresh samples)
35
MeritFed: How to Solve Auxiliary Problem
Approach 1: use fresh data (if one can get fresh samples)
36
MeritFed: How to Solve Auxiliary Problem
Approach 1: use fresh data (if one can get fresh samples)
37
MeritFed: How to Solve Auxiliary Problem
Approach 1: use fresh data (if one can get fresh samples)
38
MeritFed: How to Solve Auxiliary Problem
Approach 1: use fresh data (if one can get fresh samples)
extra validation/training dataset
39
Mirror Descent
on a probability simplex with Kulback-Leibler distance as a Bregman divergence
Problem:
Method:
Amir Beck. 2017. First-order methods in optimization. SIAM.
40
Convergence Theory
Assumptions:
41
Convergence Theory
Assumptions:
42
Convergence Theory
Assumptions:
43
Convergence Theory
Assumptions:
44
Convergence Theory
Assumptions:
the same bound as for “Ideal” Parallel SGD that uses only clients with the same data distribution
45
Convergence Theory
Assumptions:
the same bound as for “Ideal” Parallel SGD that uses only clients with the same data distribution
Term caused by �inaccurate solution�of aux. problem
46
Numerical Results: Problems and Baselines
We tested MeritFed on several tasks:
47
Numerical Results: Problems and Baselines
We tested MeritFed on several tasks:
Baselines:
48
Mean Estimation
Setup:
Problem:
49
Mean Estimation
Setup:
Problem:
50
Mean Estimation
Setup:
Problem:
51
ResNet18 @ CIFAR10: Setup
52
ResNet18 @ CIFAR10: Results with Extra Data
53
ResNet18 @ CIFAR10: Results without Extra Data
MeritFed works even without extra data!
54
BERT @ GoEmotions: Setup
55
BERT @ GoEmotions: Results with Extra Data
56
BERT @ GoEmotions: Results with Extra Data
57
Bonus: Byzantine-Robustness for Free
Setup:
Attacks:
58
Bonus: Byzantine-Robustness for Free
59
Low-Resource Machine Translation
60
Samuel Horváth�Assistant Professor MBZUAI
V. Moskvoretskii, N. Tupitsa, C. Biemann, S. Horváth, E. Gorbunov, I. Nikishina. Low-Resource Machine Translation through the Lens of Personalized Federated Learning (EMNLP Findings 2024)
Irina Nikishina�Postdoc �Universität Hamburg
Chris Biemann�Professor �Universität Hamburg
Nazarii Tupitsa�Research Assistant MBZUAI
Viktor Moskvoretskii�Researcher�Skoltech�(searches for PhD positions!)
61
There are about 7000 Languages
https://phontron.com/class/multiling2022/assets/slides/multiling-03-typology.pdf
…but many of them possess low amount of resources (texts)
62
Training LLMs for Low-Resource Languages
Existing approaches:
https://phontron.com/class/multiling2022/assets/slides/multiling-03-typology.pdf
63
Training LLMs for Low-Resource Languages
Existing approaches:
https://phontron.com/class/multiling2022/assets/slides/multiling-03-typology.pdf
64
Training LLMs for Low-Resource Languages
Existing approaches:
https://phontron.com/class/multiling2022/assets/slides/multiling-03-typology.pdf
65
Training LLMs for Low-Resource Languages
Existing approaches:
https://phontron.com/class/multiling2022/assets/slides/multiling-03-typology.pdf
66
Training LLMs for Low-Resource Languages
Existing approaches:
https://phontron.com/class/multiling2022/assets/slides/multiling-03-typology.pdf
67
Training LLMs for Low-Resource Languages
Existing approaches:
https://phontron.com/class/multiling2022/assets/slides/multiling-03-typology.pdf
68
Languages in NLP As Clients in FL
Federated Learning
Natural Language Processing
69
Languages in NLP As Clients in FL
Federated Learning
Natural Language Processing
Not much data
Harder to train a model
70
Languages in NLP As Clients in FL
Federated Learning
Natural Language Processing
Not much data
Harder to train a model
Let us apply MeritFed!
71
MeritOpt
a.k.a. MeritFed-type wrapper for any stochastic first-order method
For example, OptStep can be a step of SGD, AdaGrad, RMSProp, Adam, etc.
72
Considered Tasks and Setup
Tasks:
Model: M2M100
Baselines:
73
South East Asian Languages
74
South East Asian Languages
75
South East Asian Languages
76
Conclusion
77
Main Takeaways
78
Limitations
79
Thank you!