Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
D-Cliques
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SaCS
Distributed Machine Learning
D-Cliques
Commits
ce2a41ab
Commit
ce2a41ab
authored
3 years ago
by
aurelien.bellet
Browse files
Options
Downloads
Patches
Plain Diff
denote model parameters by theta to avoid conflict with feature vector x in def of skew
parent
f5f9fd1b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mlsys2022style/d-cliques.tex
+6
-6
6 additions, 6 deletions
mlsys2022style/d-cliques.tex
mlsys2022style/setting.tex
+13
-9
13 additions, 9 deletions
mlsys2022style/setting.tex
with
19 additions
and
15 deletions
mlsys2022style/d-cliques.tex
+
6
−
6
View file @
ce2a41ab
...
...
@@ -173,15 +173,15 @@ averaging step as in the original version.
\caption
{
D-SGD with Clique Averaging, Node
$
i
$}
\label
{
Algorithm:Clique-Unbiased-D-PSGD
}
\begin{algorithmic}
[1]
\STATE
\textbf
{
Require
}
initial model parameters
$
x
_
i
^{
(
0
)
}$
, learning
\STATE
\textbf
{
Require
}
initial model parameters
$
\theta
_
i
^{
(
0
)
}$
, learning
rate
$
\gamma
$
, mixing weights
$
W
$
, mini-batch size
$
m
$
, number of
steps
$
K
$
\FOR
{$
k
=
1
,
\ldots
, K
$}
\STATE
$
s
_
i
^{
(
k
)
}
\gets
\text
{
mini
-
batch sample of size
$
m
$
drawn
from~
}
D
_
i
$
\STATE
$
g
_
i
^{
(
k
)
}
\gets
\frac
{
1
}{
|
\textit
{
Clique
}
(
i
)
|
}
\sum
_{
j
\in
\textit
{
Clique
(
i
)
}}
\nabla
F
(
x
_
j
^{
(
k
-
1
)
}
; s
_
j
^{
(
k
)
}
)
$
\STATE
$
x
_
i
^{
(
k
-
\frac
{
1
}{
2
}
)
}
\gets
x
_
i
^{
(
k
-
1
)
}
-
\gamma
g
_
i
^{
(
k
)
}$
\STATE
$
x
_
i
^{
(
k
)
}
\gets
\sum
_{
j
\in
N
}
W
_{
ji
}^{
(
k
)
}
x
_
j
^{
(
k
-
\frac
{
1
}{
2
}
)
}$
\STATE
$
g
_
i
^{
(
k
)
}
\gets
\frac
{
1
}{
|
\textit
{
Clique
}
(
i
)
|
}
\sum
_{
j
\in
\textit
{
Clique
(
i
)
}}
\nabla
F
(
\theta
_
j
^{
(
k
-
1
)
}
; s
_
j
^{
(
k
)
}
)
$
\STATE
$
\theta
_
i
^{
(
k
-
\frac
{
1
}{
2
}
)
}
\gets
\theta
_
i
^{
(
k
-
1
)
}
-
\gamma
g
_
i
^{
(
k
)
}$
\STATE
$
\theta
_
i
^{
(
k
)
}
\gets
\sum
_{
j
\in
N
}
W
_{
ji
}^{
(
k
)
}
\theta
_
j
^{
(
k
-
\frac
{
1
}{
2
}
)
}$
\ENDFOR
\end{algorithmic}
\end{algorithm}
...
...
@@ -206,9 +206,9 @@ Clique Averaging (Section~\ref{section:clique-averaging})
allows us to compute an unbiased momentum from the
unbiased average gradient
$
g
_
i
^{
(
k
)
}$
of Algorithm~
\ref
{
Algorithm:Clique-Unbiased-D-PSGD
}
:
\begin{equation}
v
_
i
^{
(k)
}
\leftarrow
m v
_
i
^{
(k-1)
}
+ g
_
i
^{
(k)
}
v
_
i
^{
(k)
}
\leftarrow
m v
_
i
^{
(k-1)
}
+ g
_
i
^{
(k)
}
.
\end{equation}
It then suffices to modify the original gradient step to use momentum:
\begin{equation}
x
_
i
^{
(k-
\frac
{
1
}{
2
}
)
}
\leftarrow
x
_
i
^{
(k-1)
}
-
\gamma
v
_
i
^{
(k)
}
\theta
_
i
^{
(k-
\frac
{
1
}{
2
}
)
}
\leftarrow
\theta
_
i
^{
(k-1)
}
-
\gamma
v
_
i
^{
(k)
}
.
\end{equation}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
mlsys2022style/setting.tex
+
13
−
9
View file @
ce2a41ab
...
...
@@ -6,16 +6,19 @@
We consider a set
$
N
=
\{
1
,
\dots
, n
\}
$
of
$
n
$
nodes seeking to
collaboratively solve a classification task with
$
L
$
classes. Each node has access to a local dataset that
follows its own local distribution
$
D
_
i
$
. The goal is to find a global model
$
x
$
that performs well on the union of the local distributions by minimizing
follows its own local distribution
$
D
_
i
$
. The goal is to find the parameters
$
\theta
$
of a global model that performs well on the union of the local
distributions by
minimizing
the average training loss:
\begin{equation}
\min
_{
x
}
\frac
{
1
}{
n
}
\sum
_{
i=1
}^{
n
}
\mathds
{
E
}_
{
s
_
i
\sim
D
_
i
}
[F
_
i(
x
;s
_
i)],
\min
_{
\theta
}
\frac
{
1
}{
n
}
\sum
_{
i=1
}^{
n
}
\mathds
{
E
}_
{
s
_
i
\sim
D
_
i
}
[F
_
i(
\theta
;s
_
i)],
\label
{
eq:dist-optimization-problem
}
\end{equation}
where
$
s
_
i
$
is a data example drawn from
$
D
_
i
$
and
$
F
_
i
$
is the loss function
on node
$
i
$
. Therefore,
$
\mathds
{
E
}_{
s
_
i
\sim
D
_
i
}
F
_
i
(
x;s
_
i
)
$
denotes the
on node
$
i
$
. Therefore,
$
\mathds
{
E
}_{
s
_
i
\sim
D
_
i
}
F
_
i
(
\theta
;s
_
i
)
$
denotes
the
expected loss of model
$
x
$
on a random example
$
s
_
i
$
drawn from
$
D
_
i
$
.
To collaboratively solve Problem
\eqref
{
eq:dist-optimization-problem
}
, each
...
...
@@ -30,7 +33,8 @@ Gradient Descent algorithm, aka D-SGD~\cite{lian2017d-psgd}. As
shown in Algorithm~
\ref
{
Algorithm:D-PSGD
}
,
a single iteration of D-SGD at node
$
i
$
consists of sampling a mini-batch
from its local distribution
$
D
_
i
$
, updating its local model
$
x
_
i
$
by taking a stochastic gradient descent
$
D
_
i
$
, updating its local model
$
\theta
_
i
$
by taking a stochastic gradient
descent
(SGD) step according to the mini-batch, and performing a weighted average of
its local model with those of its
neighbors.
...
...
@@ -63,14 +67,14 @@ topology $G$, namely:\todo{AB: if we need space we can remove this equation}
\caption
{
D-SGD, Node
$
i
$}
\label
{
Algorithm:D-PSGD
}
\begin{algorithmic}
[1]
\STATE
\textbf
{
Require:
}
initial model parameters
$
x
_
i
^{
(
0
)
}$
,
\STATE
\textbf
{
Require:
}
initial model parameters
$
\theta
_
i
^{
(
0
)
}$
,
learning rate
$
\gamma
$
, mixing weights
$
W
$
, mini-batch size
$
m
$
,
number of steps
$
K
$
\FOR
{$
k
=
1
,
\ldots
, K
$}
\STATE
$
s
_
i
^{
(
k
)
}
\gets
\text
{
mini
-
batch sample of size
$
m
$
drawn
from~
}
D
_
i
$
\STATE
$
x
_
i
^{
(
k
-
\frac
{
1
}{
2
}
)
}
\gets
x
_
i
^{
(
k
-
1
)
}
-
\gamma
\nabla
F
(
x
_
i
^{
(
k
-
1
)
}
; s
_
i
^{
(
k
)
}
)
$
\STATE
$
x
_
i
^{
(
k
)
}
\gets
\sum
_{
j
\in
N
}
W
_{
ji
}^{
(
k
)
}
x
_
j
^{
(
k
-
\frac
{
1
}{
2
}
)
}$
\STATE
$
\theta
_
i
^{
(
k
-
\frac
{
1
}{
2
}
)
}
\gets
\theta
_
i
^{
(
k
-
1
)
}
-
\gamma
\nabla
F
(
\theta
_
i
^{
(
k
-
1
)
}
; s
_
i
^{
(
k
)
}
)
$
\STATE
$
\theta
_
i
^{
(
k
)
}
\gets
\sum
_{
j
\in
N
}
W
_{
ji
}^{
(
k
)
}
\theta
_
j
^{
(
k
-
\frac
{
1
}{
2
}
)
}$
\ENDFOR
\end{algorithmic}
\end{algorithm}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment