# ESiWACE2 Services: RSE collaborations in Weather and Climate

Gijs van den Oord1, Victor Azizi1, Alessio Sclocco1, Georges-Emmanuel
Moulard2, David Guibert2,
Jisk Attema1, Erwan Raffin2, Ben van Werkhoven1  1Netherlands eScience Center,
Amsterdam, the Netherlands  2Center for Excellence in Performance Programming,
Atos Bull, Rennes, France

###### Abstract

We present the collaborative model of ESiWACE2 Services, where Research
Software Engineers (RSEs) from the Netherlands eScience Center (NLeSC) and
Atos offer their expertise to climate and earth system modeling groups across
Europe. Within 6-month collaborative projects, the RSEs intend to provide
guidance and advice regarding the performance, portability to new
architectures, and scalability of selected applications. We present the four
awarded projects as examples of this funding structure.

##  1 Introduction

Weather and climate models are large and complex applications that experience
a tension field between investments to enhance the numerical representation of
the underlying physics, by e.g. resolving more processes, increasing spatio-
temporal resolution or enhancing the statistics of a forecast ensemble, and on
the other hand investments to adapt the software to the latest hardware
architectures [1]. The latter investments are generally viewed within the
community as a necessary burden to increase model performance and hardware
utilisation, and therefore enable the aforementioned model accuracy
improvements. Ideally, the code optimizations are minimally intrusive and
allow domain scientists to explore the impact of new experimental features on
the model results.

However, after a long period of relative stability, the computing
infrastructure is rapidly evolving and diversifying, with more change on the
horizon [2]. The above principle of minimal changes to the source code is no
longer maintainable as Fortran compilers are unable to efficiently map the
data layout and compute pipeline onto these new hardware architectures.
Adapting existing software to the latest computing platforms and exploiting
the full capability of the architecture therefore requires specific expertise
and extensive changes at the source code level [3]. As such, continued
development of weather and climate models requires new collaborations between
experts from different fields [4].

The ESiWACE2 Center of Excellence111http://www.esiwace.eu aims to support the
exascale preparations for the weather and climate modelling community in
Europe. Within this project, we have set up a service, targeting the community
at large, including marine, atmospheric, surface and ice modeling groups. The
service establishes short collaboration projects between research software
engineers (RSEs) and model development groups, with the goal of providing
guidance, engineering, and advice to improve model efficiency and port models
to existing and upcoming computing infrastructures.

We have realized this by setting up a call for project proposals. The
proposals are reviewed on technical feasibility by the RSEs, and on scientific
merit and relevance by an external scientific review committee. When found
eligible, the project is granted 6 person months of in-kind contribution by
the RSEs from the Netherlands eScience Center and Atos. We have organized the
call such that researchers can participate with minimal effort: filling in a
simple form with a concise description of the requested work is sufficient.
Detailed planning, descriptions of technologies or deep scientific motivation
were not required in order to attract smaller, less specialized modeling
groups as well. We did however require participants to be owner of the
software, to invest time in guiding the RSEs during their work and provide
benchmark cases, and to genuinely consider adopting the developed code in
their main development branch. The first four of these projects are now
proceeding and generating the first results.

In this paper, we present the case of the ESiWACE2 Service model as a way to
fund RSE activities and create new collaborations between RSEs and research
groups. Because the projects are relatively short, the work focuses on
exploratory porting, finding and resolving performance bottlenecks, giving
advice, and providing expertise rather than porting an entire code base to a
new architecture. Nevertheless, the work of the RSE is expected to be a
stepping stone towards exascale deployment of the software and the knowledge
transfer could have a lasting impact on the development team’s perspective on
code optimization and hardware utilization of their application.

##  2 Case Studies

This section presents the ongoing work in the four projects that were granted
in the in the ESiWACE2 Service 1 call, which run in the year 2020. One week
in-person visits by one of the RSEs to the institute of the principal
investigator of each project were originally planned as part of the project,
but these visits have been cancelled due to the covid-19 pandemic.

###  2.1 FESOM2

in collaboration with the Alfred Wegener Institute for Polar and Marine
Research (AWI), NLeSC, and Atos

The Finite-Element Sea Ice and Ocean Model FESOM 2.0 [5] is a finite-volume
ocean and sea ice model using unstructured global (or regional) meshes. The
grid consists of prismatic cells and may have local refinements and a varying
number of active vertical layers depending on the bathymetry. FESOM is part of
the AWI earth system model and has couplings to ECHAM6 and OpenIFS via the
OASIS framework. Its MPI scaling [6] and sea-ice solver method [7] have been
subject of extensive optimization efforts. The main goal of this project is to
explore the benefits of porting FESOM2 to GPUs. After a performance and code
analysis and discussion with the FESOM team, we have decided to focus on the
expensive tracer advection routines. We are investigating both a manual
porting into tuneable CUDA-C kernels [8], as well as the insertion of OpenACC
directives in the original Fortran code.

###  2.2 DALES

in collaboration with Centrum Wiskunde & Informatica (CWI), NLeSC, and Atos

The Dutch Atmospheric Large Eddy Simulation (DALES) [9] is a high-resolution
three-dimensional solver focused on boundary layer turbulence and cloud
physics. It uses a rectangular grid of finite extent and periodic boundary
conditions in the horizontal. The main goals of the project are to generally
improve parallel scaling and memory throughput of the numerical schemes in the
code. The proposed optimisations include introducing an iterative multi-grid
solver for the pressure equation (instead of the current FFT-based approach),
overlapping communication and computation during halo exchanges, using a more
cache-friendly blocked data and loop structure, and experiment with single-
precision prognostic fields. After discussing with the main developers of
DALES, we have decided to focus on the pressure equation solver, the MPI
optimisations, and the single-precision version of the code. We benchmark our
results and timings with a simple case and a more realistic setup featuring
many physical processes and a large domain extent. Initial tests show better
scaling of DALES using the iterative solver when running on
$\mathcal{O}(1000)$ cores.

###  2.3 EMAC

in collaboration with the Cyprus Institute, Atos and NLeSC

Embedded within the modular climate coupling framework messy2 [10], the
ECHAM/MESSy Atmospheric Chemistry model EMAC [11] describes chemical
interactions in the atmosphere, including sources from ocean biochemistry,
land processes and anthropogenic emissions. This computationally intensive
code has been ported to GPUs using CUDA [12] to achieve large speedups. The
goal of our work is to reduce the memory footprint of the code in the device
code, and as such allow more MPI tasks to be concurrently run on the same
hardware. This will allow the model to handle an order of magnitude more
complex chemistry, targeting the main organics mechanism, in atmospheric
models and enable multiyear high-resolution simulations with EMAC. We
currently have succeeded in significantly reducing the memory consumption by
reducing stack allocations, and we are currently investigating the use of CUDA
streams to further overlap compute and data transfers [13].

###  2.4 OBLIMAP2

in collaboration with KNMI and Atos

OBLIMAP-2.0 [14] is a fast, distributed climate–ice sheet model coupling code
that includes online embeddable mapping routines. It can be used to evaluate
atmospheric forcings and geothermal heat fluxes upon an ice sheet, allowing
intermediate coordinate system projections between these data sources. The
goal of the RSEs is to reduce the memory footprint of the code by improving
its distribution over parallel tasks and secondly resolve the I/O bottleneck
by implementing parallel NetCDF reading and writing. This will improve the
multi-node scaling of OBLIMAP and establish it as a candidate ice coupling
library for large-scale, high-resolution climate models. After a first phase
in which the latest version code was moved to GitHub, the code is deployed on
the Atos Bull Sequana XH2000 supercomputer, equipped with AMD Rome (7742), and
performance profiling is ongoing.

##  3 Conclusions

With the first set of projects ongoing, we may already conclude that the
collaboration with RSEs shines new light on the awarded applications. Together
with the engineers, the modeling groups rethink their stance in the tension
field between application performance, code maintainability and model
complexity. Vice versa, the RSEs adopt knowledge about earth system modeling
and the associated HPC aspects. Where some applications have already shown
speedup, other projects are still exploring suitable technologies.

We will organize new calls for project proposals in the coming years for the
duration of the ESiWACE2 project and will further evaluate the funding
instrument at the end of the project. Nevertheless, it is clear that this
funding strategy stimulates RSEs and HPC experts to be outward-looking and
stimulate knowledge transfer towards smaller, less specialized modeling groups
across the EU.

## Acknowledgments

ESiWACE2 has received funding from the European Union’s Horizon 2020 research
and innovation programme under grant agreement No 823988.

## References

  * [1] B. N. Lawrence, M. Rezny, R. Budich, P. Bauer, J. Behrens, M. Carter, W. Deconinck, R. Ford, C. Maynard, S. Mullerworth, C. Osuna, A. Porter, K. Serradell, S. Valcke, N. Wedi, and S. Wilson, “Crossing the chasm: how to develop weather and climate models for next generation computers?” _Geoscientific Model Development_ , vol. 11, no. 5, pp. 1799–1821, 2018. [Online]. Available: https://gmd.copernicus.org/articles/11/1799/2018/
  * [2] S. Heldens, P. Hijma, B. V. Werkhoven, J. Maassen, A. S. Z. Belloum, and R. V. Van Nieuwpoort, “The landscape of exascale research: A data-driven literature analysis,” _ACM Comput. Surv._ , vol. 53, no. 2, Mar. 2020. [Online]. Available: https://doi.org/10.1145/3372390
  * [3] B. van Werkhoven, W. J. Palenstijn, and A. Sclocco, “Lessons learned in a decade of research software engineering gpu applications,” in _Computational Science – ICCS 2020_. Cham: Springer International Publishing, 2020, pp. 399–412.
  * [4] A. Müller, W. Deconinck, C. Kühnlein, G. Mengaldo, M. Lange, N. Wedi, P. Bauer, P. K. Smolarkiewicz, M. Diamantakis, S.-J. Lock, M. Hamrud, S. Saarinen, G. Mozdzynski, D. Thiemert, M. Glinton, P. Bénard, F. Voitus, C. Colavolpe, P. Marguinaud, Y. Zheng, J. Van Bever, D. Degrauwe, G. Smet, P. Termonia, K. P. Nielsen, B. H. Sass, J. W. Poulsen, P. Berg, C. Osuna, O. Fuhrer, V. Clement, M. Baldauf, M. Gillard, J. Szmelter, E. O’Brien, A. McKinstry, O. Robinson, P. Shukla, M. Lysaght, M. Kulczewski, M. Ciznicki, W. Piątek, S. Ciesielski, M. Błażewicz, K. Kurowski, M. Procyk, P. Spychala, B. Bosak, Z. P. Piotrowski, A. Wyszogrodzki, E. Raffin, C. Mazauric, D. Guibert, L. Douriez, X. Vigouroux, A. Gray, P. Messmer, A. J. Macfaden, and N. New, “The escape project: Energy-efficient scalable algorithms for weather prediction at exascale,” _Geoscientific Model Development_ , vol. 12, no. 10, pp. 4425–4441, 2019. [Online]. Available: https://gmd.copernicus.org/articles/12/4425/2019/
  * [5] S. Danilov, D. Sidorenko, Q. Wang, and T. Jung, “The finite-volume sea ice–ocean model (fesom2),” _Geoscientific Model Development_ , vol. 10, no. 2, pp. 765–789, 2017. [Online]. Available: https://gmd.copernicus.org/articles/10/765/2017/
  * [6] N. V. Koldunov, V. Aizinger, N. Rakowsky, P. Scholz, D. Sidorenko, S. Danilov, and T. Jung, “Scalability and some optimization of the finite-volume sea ice–ocean model, version 2.0 (fesom2),” _Geoscientific Model Development_ , vol. 12, no. 9, pp. 3991–4012, 2019. [Online]. Available: https://gmd.copernicus.org/articles/12/3991/2019/
  * [7] N. V. Koldunov, S. Danilov, D. Sidorenko, N. Hutter, M. Losch, H. Goessling, N. Rakowsky, P. Scholz, D. Sein, Q. Wang, and T. Jung, “Fast evp solutions in a high-resolution sea ice model,” _Journal of Advances in Modeling Earth Systems_ , vol. 11, no. 5, pp. 1269–1284, 2019. [Online]. Available: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2018MS001485
  * [8] B. van Werkhoven, “Kernel tuner: A search-optimizing gpu code auto-tuner,” _Future Generation Computer Systems_ , vol. 90, pp. 347–358, 2019.
  * [9] T. Heus, C. C. van Heerwaarden, H. J. J. Jonker, A. Pier Siebesma, S. Axelsen, K. van den Dries, O. Geoffroy, A. F. Moene, D. Pino, S. R. de Roode, and J. Vilà-Guerau de Arellano, “Formulation of the dutch atmospheric large-eddy simulation (dales) and overview of its applications,” _Geoscientific Model Development_ , vol. 3, no. 2, pp. 415–444, 2010. [Online]. Available: https://gmd.copernicus.org/articles/3/415/2010/
  * [10] P. Jöckel, A. Kerkweg, A. Pozzer, R. Sander, H. Tost, H. Riede, A. Baumgaertner, S. Gromov, and B. Kern, “Development cycle 2 of the modular earth submodel system (messy2),” _Geoscientific Model Development_ , vol. 3, no. 2, pp. 717–752, 2010. [Online]. Available: https://gmd.copernicus.org/articles/3/717/2010/
  * [11] M. Alvanos and T. Christoudias, “Gpu-accelerated atmospheric chemical kinetics in the echam/messy (emac) earth system model (version 2.52),” _Geoscientific Model Development_ , vol. 10, no. 10, pp. 3679–3693, 2017\. [Online]. Available: https://gmd.copernicus.org/articles/10/3679/2017/
  * [12] M. Alvanos and T. Christoudias, “Accelerating atmospheric chemical kinetics for climate simulations,” _IEEE Transactions on Parallel and Distributed Systems_ , vol. 30, no. 11, pp. 2396–2407, 2019.
  * [13] B. Van Werkhoven, J. Maassen, F. J. Seinstra, and H. E. Bal, “Performance models for cpu-gpu data transfers,” in _2014 14th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing_. IEEE, 2014, pp. 11–20.
  * [14] T. J. Reerink, W. J. van de Berg, and R. S. W. van de Wal, “Oblimap 2.0: a fast climate model–ice sheet model coupler including online embeddable mapping routines,” _Geoscientific Model Development_ , vol. 9, no. 11, pp. 4111–4132, 2016. [Online]. Available: https://gmd.copernicus.org/articles/9/4111/2016/


# FedControl: When Control Theory Meets Federated Learning

Adnan Ben Mansour  Gaia Carenini  Alexandre Duplessis  David Naccache

###### Abstract

To date, the most popular federated learning algorithms use coordinate-wise
averaging of the model parameters. We depart from this approach by
differentiating client contributions according to the performance of local
learning and its evolution. The technique is inspired from control theory and
its classification performance is evaluated extensively in IID framework and
compared with FedAvg.

Fedetared Learning, Control Theory, Aggregation

##  1 Introduction

Until recently, machine learning models were extensively trained in a data
center setting using powerful computing nodes, fast inter-node communication
links, and large centrally available training datasets. The future of machine
learning lies in moving both data collection as well as model training to the
edge. Moreover, nowadays, more and more collected data-sets are privacy
sensitive, in particular in confidentiality-critical fields such as patients’
medical information processing. Specifically, reducing human exposure to data
is highly desirable to avoid confidentiality violations due to human failure.
This may preclude logging to a data center and performing training there using
conventional approaches. In 2017, (McMahan et al., 2017) advocated an
alternative distributed data-mining technique for edge devices, termed
Federated Learning (FL), allowing a decoupling of model training from the need
for direct access to the raw training data.
_Federated Learning_ (FL) is a protocol acting according to Algorithm 1, (Li
et al., 2020). FL involves a group of devices named _clients_ and a server
that coordinates the learning process. Each client has a local training data-
set which is never uploaded to the _server_. The goal is to train a global
model by aggregating local training results. Parameters, fixed by server,
include: a set $I$ grouping _N_ clients, the ratio of clients _C_ selected at
each round, the number of communication rounds _R_ and a number of local
epochs _E_. We note $\overline{r}=rE$ the epoch corresponding to round $r$.
The model is defined by its weights: at the end of each epoch
$t\in\\{0,\dots,RE-1\\}$, $w_{t+1}^{i}$ defines the weights of client $i\in
I$. For each communication round $r\in\\{0,1,\dots,(R-1)\\}$,
$w_{\overline{r}}$ is the global model detained by the server and
$w_{\overline{R}}$ is the final weight.

Algorithm 1 Generic Federated Learning Algorithm

Input: _N_ , _C_ , _R_ , _E_ Output: $w_{\overline{R}}$

1: Initialize $w_{\overline{0}}$.

2: for each round $r\in\\{0,1,\dots,(R-1)\\}$ do

3: $I_{r}\leftarrow\text{random set of $\max(C\cdot N,1)$ clients}$

4: for each client $i\in I_{r}$ in parallel do

5: $w_{\overline{r+1}}^{i}\leftarrow\text{{Client-Update}}(w_{\overline{r}})$

6: end for

7:
$w_{\overline{r+1}}\leftarrow\text{{Aggregation}}(w_{\overline{r+1}}^{1},\dots,w_{\overline{r+1}}^{N})$

8: end for

9: return $w_{\overline{R}}$

Algorithm 1 encodes the training procedure described below. There is a fixed
set of $I=\\{1,\dots,N\\}$ clients (each with a local data-set). Before every
communication round $r$ the server randomly selects a set $I_{r}$ of $C\cdot
N$ clients, sends them the current global algorithm state, and then asks them
to perform local computations based on the global state and their local data-
set, and send back an update. At the end, it updates the weights of the model
by aggregating clients’ updates and the process repeats. For sake of
generality, no structure is specified for the local training procedure
(_Client-Update_): several different methods can be employed, for instance
mini-batch SGD (Gower et al., 2019), Newton methods or PAGE (Zhao et al.,
2021). Similarly, no function for model aggregation is given yet.

##### Model Aggregation

To date, several aggregating functions have been proposed to accomplish this
task. In 2017, (McMahan et al., 2017) proposed a plain coordinate-wise mean
averaging of model weights. (Ek et al., 2021) adjusted this to enforce
closeness of local and global updates. (Yurochkin et al., 2019) takes the
invariance of network weights to permutation into account. More recently,
(Mächler et al., 2021) suggested to add a derivative term to FedAvg enhancing
the relevance, in the aggregation, of the models of the clients whose
performance are rapidly improving. Despite all advances, there is no formal
way to establish in the general case which aggregation strategy to select.

##### Our Contribution

We introduce a new class of aggregation algorithms called FedControl. All
class members contain a differential term and an integral term, augmenting
rapidity and stability. Furthermore, we provide an intuitive control theory
interpretation of them as PID controllers (cf. (Lee, 2004)). We validate
empirically the model and compare it with other state of the art algorithms.

##  2 Structure and Interpretation

As observed in the concluding remarks of (Mächler et al., 2021), there is a
proper way for interpreting a FL problem as a control problem and then
establish an equivalence between the central server that does the aggregation
and a control unit in a feedback loop. Extending the interpretation to the
weighted averaging approach, it is natural to interpret the aggregation
procedure introduced in (Mächler et al., 2021) as an approximation of a PID
controller where the cardinality-dependent and the loss-dependent terms are
respectively functioning as the proportional component and the derivative
component in a PID controller (PIDC). In the wake of this interpretation, a
natural better approximation for PIDCs can be obtained by adding an integral
part to FedCostWAvg. From now on, we will refer with the name FedControl to
any aggregation algorithm including a proportional component, a derivative
component and an integral component.

###  2.1 The Class of FedControl methods

We note $\ell_{r}^{i}=F_{i}(w_{\overline{r}}^{i})$ the local loss of client
$i$ at the end of round $r-1$. The class of FedControl algorithms has an
aggregation function of the form:

$w_{\overline{r}}=\sum\limits_{i=1}^{N}w_{\overline{r}}^{i}\cdot\big{(}\alpha\frac{s^{i}}{S}+\beta\frac{d_{r}^{i}}{D_{r}}+(1-\alpha-\beta)\frac{k_{r}^{i}}{K_{r}}\big{)}$
(1)

where $\alpha$ and $\beta$ are positive parameters, $s^{i}$ is the number of
samples in the data-set of client $i$, $d_{r}^{i}$ is the _derivative term_
associated to client $i$ at round $r$, and $k_{r}^{i}$ is the _integral term_
associated to client $i$ at round $r$ and $S$, $D_{r}$, $K_{r}$ are the
_normalization terms_ , that is:

$S=\sum\limits_{i=1}^{N}s^{i},\quad D_{r}=\sum\limits_{i=1}^{N}d_{r}^{i},\quad
K_{r}=\sum\limits_{i=1}^{N}k_{r}^{i}$ (2)

####  2.1.1 The Derivative Term

The derivative term is intuitively the component measuring the speed of
decaying of the loss. There is neither an evident nor a unique way to encode
such a term. For simplicity, we will study a term inspired by the one
introduced in (Mächler et al., 2021), that is:

$d_{r}^{i}=\ell_{r-1}^{i}/\ell_{r}^{i}$ (3)

####  2.1.2 The Integral Term

The integral term plays instead the role of stabilizer. We have considered the
following form for such a term:

$k_{r}^{i}=\sum\limits_{r^{\prime}=1}^{r}\lambda^{(r-r^{\prime})}\ell_{r^{\prime}}^{i}$
(4)

where $0\leq\lambda\leq 1$ is a weighting parameter.

##  3 Experiments

We studied extensively the behavior of the aggregation strategies proposed and
compared them to (McMahan et al., 2017). In particular, we evaluate the
aggregation strategies’ performance in classification tasks in IID framework
in a synthetic distributed setting.

###  3.1 Experimental Set-Up

##### Synthetic Datasets

We generate a synthetic dataset corresponding to the IID balanced framework by
sorting data according to labels, choosing the cardinality of the different
local datasets and distributing the items preserving an identical label
distribution over the clients.

##### Tasks description

We measure the performance of our aggregation strategies on a classification
task over the dataset Fashion-MNIST (Xiao et al., 2017).

##### Model

The model used on FMINIST items is a CNN with two $3\times 3$ convolution
layers (the first with 32 channels, the second with 64, each followed with
$2\times 2$ max pooling), a fully connected layer with 1600 units and ReLu
activation, and a final softmax output layer. The local learning algorithm is
a simple mini-batch SGD with a batch size fixed at $64$.

##### Hyperparameters

We ran all tasks for a small number of communication rounds (between
$100-150$) that is enough to investigate the initial convergence speed and
with a total number of clients equal to $100$. The decreasing learning rate
$\eta_{r}$ is set to $10^{-3}\cdot 0.99^{r}$ for each communication round
$r\in\\{0,\dots R-1\\}$. The parameter choices follow from the standard
assumptions (dimension of the batch) and from an extensive empirical selection
aimed to maximize the accuracy reached after 100 communication rounds. We fix
the values of the coefficients $\alpha,\beta$ to $1/3$.

##### Evaluation

In order to evaluate our family of algorithm, we compare the performance of
FedControl with the one of FedAvg and FedWCostAvg in IID framework, by
measuring both the accuracy on $100$ global epochs, and the $R_{60}$ which is
the number of communication rounds required to reach $60\%$ accuracy.

###  3.2 Resources

The Pytorch code has been trained on a NVIDIA Tesla V100 GPU, with 16 GB of
GPU memory on an AWS instance for $\simeq 50$ hours, followed by $\simeq 50$
hours on a NVIDIA RTX 3090 with $24$ GB of GPU memory.

###  3.3 Experimental Results

The results of the experiment evidence how the performance of all the methods
are almost indistinguishable in terms of accuracy and $R_{60}$ (Figure 1).
Only FedAvg seems to perform slightly better than the other methods. This
advantage of FedAvg seems related to the experimental context. In fact, in a
supplementary experience, conducted in Non-IID framework upon FMNIST with
parameters $\eta_{r}=10^{-3}\cdot 0.99^{r}$, where we compare on $150$ global
epochs the performance of FedWCostAvg with the one of FedAvg, the results are
reversed (Figure 2).
Concerning instead the $R_{60}$, we get the results below:

_Strategies_ | _$\textrm{R}_{60}$_ |
---|---|---
FedAvg | $6.198\pm 0.122$ |
FedWCostAvg | $6.269\pm 0.143$ |
FedControl($\lambda=1$) | $6.215\pm 0.130$ |
FedControl($\lambda=0.8$) | $6.375\pm 0.140$ |

Figure 1: Accuracy over rounds on FMNIST IID with confidence interval at 95%
Figure 2: Accuracy over rounds on FMNIST non-IID with confidence interval at
95%

##  4 Discussion and Conclusion

##### Contribution

In this paper, we have presented a new class of aggregation strategies
designed by analogy with PID controllers. These aggregations establish every
round the contribution of each client according to to the performance of local
learning in the previous round, and keeping trace of the whole training
history. We have tested these methods extensively concluding that their
performances are comparable with the ones of the best algorithms at the state
of the art.

##### Limitation and Further work

Several limitations are present in this work and may be the starting point for
further investigations. We list the main ones below in increasing order of
importance.
The first point of weakness concerns the lack of tuning for parameters
$\alpha$ and $\beta$ that have been fixed to $\frac{1}{3}$ to study the case
of balanced influence of the averaging, derivative and integral terms. An
optimal choice of these constants could have led to better results (at least
on our dataset), since this choice is a token of the trade-off between
stability and speed.
The second point concerns the tuning for parameter $\lambda$. We did it in a
preliminary phase but not extensively enough to obtain results of interest.
The third point concerns instead the IID character of the testing framework
that may be the one where our methods perform the worst: in fact FedWCostAvg,
which is FedControl(0), seems to perform far better than standard averaging in
strongly non-IID environments and in more complex tasks, namely tumor
segmentation (Mächler et al., 2021).
The last point is the testing dataset size and the number of reproductions of
the experiments, that are both too low and must be improved in more advanced
phases of this research.

## References

  * Ek et al. (2021) Ek, S., Portet, F., Lalanda, P., and Vega, G.  A Federated Learning Aggregation Algorithm for Pervasive Computing: Evaluation and Comparison.  In _19th IEEE International Conference on Pervasive Computing and Communications PerCom 2021_ , Kassel (virtual), Germany, March 2021.  URL https://hal.archives-ouvertes.fr/hal-03207411.
  * Gower et al. (2019) Gower, R. M., Loizou, N., Qian, X., Sailanbayev, A., Shulgin, E., and Richtárik, P.  Sgd: General analysis and improved rates.  _ArXiv_ , abs/1901.09401, 2019.
  * Lee (2004) Lee, C.-H.  A survey of pid controller design based on gain and phase margins.  01 2004.
  * Li et al. (2020) Li, T., Sahu, A. K., Talwalkar, A. S., and Smith, V.  Federated learning: Challenges, methods, and future directions.  _IEEE Signal Processing Magazine_ , 37:50–60, 2020.
  * Mächler et al. (2021) Mächler, L., Ezhov, I., Kofler, F., Shit, S., Paetzold, J. C., Loehr, T., Wiestler, B., and Menze, B. H.  Fedcostwavg: A new averaging for better federated learning.  _CoRR_ , abs/2111.08649, 2021.  URL https://arxiv.org/abs/2111.08649.
  * McMahan et al. (2017) McMahan, H. B., Moore, E., Ramage, D., Hampson, S., and y Arcas, B. A.  Communication-efficient learning of deep networks from decentralized data.  In _AISTATS_ , 2017.
  * Xiao et al. (2017) Xiao, H., Rasul, K., and Vollgraf, R.  Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017.  URL https://arxiv.org/abs/1708.07747.
  * Yurochkin et al. (2019) Yurochkin, M., Agarwal, M., Ghosh, S. S., Greenewald, K. H., Hoang, T. N., and Khazaeni, Y.  Bayesian nonparametric federated learning of neural networks.  In _ICML_ , 2019.
  * Zhao et al. (2021) Zhao, H., Li, Z., and Richtárik, P.  Fedpage: A fast local stochastic gradient method for communication-efficient federated learning.  _CoRR_ , abs/2108.04755, 2021.  URL https://arxiv.org/abs/2108.04755.