# Fed-DeepONet: Stochastic Gradient-Based Federated Training of Deep Operator Networks
## 4 Numerical Experiments
### Experiment 2: Learning the Pendulum's Solution Operator \(G\)  
In this experiment, we used the adaptive Fed-DeepONet to approximate the solution operator \(G\) of the gravity pendulum with control input \(u\) described above. Verifying the performance of Fed-DeepONetIn this experiment, we tested the proposed Fed-DeepONet using \(C=20\) as the available clients. Notice that the number of clients \(C\) is a problem-dependent parameter. However, since we are interested in learning solution operators of complex dynamical systems, the potential applications for Fed-DeepONet may have a small number of clients. This motivates us to consider cases where the number of clients satisfies \(C\leq 50\). Further, we set the number of global synchronization DeepONet rounds to \(R=20\) and the number of local updates to \(K=200\) using a simple routine of hyper-parameter optimization [27]. We remark, however, that, in practice, one may need to select the parameter values for \(K\) and \(R\) considering problem-dependent constraints, such as computational resources, communication resources, near real-time performance, or cyber-security. Figure 3 illustrates the prediction of the trained Fed-DeepONet \(G_{\theta^{*}}\) via Algorithm 2 for three solution trajectories driven by test input trajectories generated using the GRF and not included in the training dataset. Furthermore, we computed the mean \(L_{2}\)-relative error using the 100 test trajectories. We obtained a mean \(L_{2}\)-relative error of \(e_{t2}=1.362\%\). Such a result illustrates the potential of DeepONet for protecting clients' data privacy or employing high-performance distributed computing frameworks while preserving the extraordinary prediction capability of the centralized DeepONet. Similarly, Figure 4 depicts the prediction of Fed-DeepONet \(G_{\theta^{*}}\), trained using Algorithm 2, for the solution trajectories driven by the out-of-distribution inputs \(u(t)\in\{t,\sin(\pi t),t\sin(2\pi t)\}\). The results illustrate that Fed-DeepONet preserves the generalization capability of the centralized DeepONet. Testing the sensitivity of Fed-DeepONet with respect to design parametersThis experiment tests the sensitivity of FeedDeepONet against the number of clients \(C\) and the fraction of available clients, which we denote as \(\alpha\in(0,1]\). First, we fixed the fraction of available clients to \(\alpha=0.75\) and varied the number of clients within set \(C\in\{10,20,40,50\}\). Then, we fixed the number of clients to \(C=20\) and varied the fraction of available clients within the set \(\alpha\in\{0.25,0.5,0.75,1.0\}\). Figure 2: A comparison of the federated training convergence between Fed-DeepONet (Algorithm 1) and Adaptive Fed-DeepONet (Algorithm 2). We used an idealistic federated scenario with \(C=20\) clients with a fraction \(\alpha=0.75\) of available clients, \(R=20\) global synchronization rounds, and \(K=200\) local updates. Tables 1 and 2 depict the mean and standard deviation of the \(L_{2}\)-relative errors \(e_{L_{2}}\) for the solution trajectories obtained using the 100 test input trajectories for different numbers of clients \(C\) or fractions of available clients \(\alpha\). The results illustrate that Fed-DeepONet is robust to the different possible configurations of federated training. _Enabling different fractions of available clients during federated training._ In this experiment, we tested the performance of the Adaptive Fed-DeepONet using a more realistic scenario, \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**\# of Clients \(C\)** & **10** & **20** & **40** & **50** \\ \hline mean \(e_{L_{2}}\) & 0.989\% & 1.154\% & 1.815\% & 2.613\% \\ st.dev. \(e_{L_{2}}\) & 1.069\% & 1.543\% & 2.057\% & 4.043\% \\ \hline \hline \end{tabular}
\end{table}