# Few-Shot Federated Learning: A Federated Learning Model for Small-Sample Scenarios
## 4 Model System
### Model Learning Process
These model comparison experiments used classification accuracy as the evaluation metric, with the specific accuracy formula presented in Equation (20). ### Result & Analysis

From a straightforward observation, it is evident that FedAvg exhibits significantly lower accuracy on the Omniglot dataset compared to the method FsFL introduced in this paper (Figure 3). Furthermore, under a one-shot scenario, the FedAvg model completely loses its usability. This observation underscores the feasibility of integrating few-shot learning techniques into federated learning systems, enhancing their capability to operate effectively in few-shot scenarios. On the other hand, it also confirms the previously mentioned point that traditional federated learning algorithms urgently need improvement to perform well in few-shot learning contexts. In addition, we also compared our method with advanced FedFSL, and the comparison results showed that the accuracy of the proposed method is better than FedFSL in both one-shot and five-shot scenarios. Given that the FC100 (Figure 4) dataset encompasses a wide variety of objects and scenes from the natural world, the content of the images is more diverse and complex. As the complexity of the dataset increases, it generally leads to a decrease in the overall model accuracy. However, it is still observable that the FsFL method proposed in this paper maintains the usability of the model to a certain extent, and that the training effects of the model remain superior to those of traditional federated learning methods and FedFSL. The experiments conducted on the previous two datasets reveal that even when employing the FsFL method, the control groups (one-shot and five-shot) show minimal differences in the accuracy of the model. This discrepancy could likely be attributed to the inherent limitations of the chosen training models. Consequently, a more complex dataset, MiniImageNet (Figure 5), was selected for further experimentation. The results demonstrated that, across four different scenarios, the model accuracy curves exhibited the anticipated shape, achieving the envisioned effects. Figure 3: Performance on the Omniglot dataset. The overall experimental results are as follows in Table 1: \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Dataset** & \multicolumn{2}{c}{**Omniglot**} & \multicolumn{2}{c}{**FC100**} & \multicolumn{2}{c}{**MiniImageNet**} \\ \hline
**Setting** & **One-Shot** & **Five-Shot** & **One-Shot** & **Five-Shot** & **One-Shot** & **Five-Shot** \\ \hline FsFL & 95.8 \(\pm\) 1.54 & 96.4 \(\pm\) 2.03 & 41.00 \(\pm\) 2.10 & 57.51 \(\pm\) 1.48 & 49.4 \(\pm\) 1.21 & 68.2 \(\pm\) 1.57 \\ Fedavg & 2 & 71.2 \(\pm\) 1.99 & 19.6 \(\pm\) 1.00 & 40.9 \(\pm\) 1.03 & 18.7 \(\pm\) 0.86 & 44.1 \(\pm\) 0.97 \\ FedFSL & 78.1 \(\pm\) 1.45 & 89.7 \(\pm\) 2.06 & 38.60 \(\pm\) 2.00 & 50.90 \(\pm\) 1.08 & 53.52 \(\pm\) 1.1 & 61.56 \(\pm\) 1.66 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of accuracy across three datasets. Figure 4: Performance on the FC100 dataset. Figure 5: Performance on the MiniImageNet dataset. We evaluated the model's performance by calculating the F1 scores on three datasets under the five-shot condition. The results are presented in Table 2 for a further assessment of the model's performance. Based on the analysis of the experimental results:

FsFL: The method presented in this paper maintains a high accuracy rate after reaching convergence on three image datasets; even under the extreme conditions of one-shot learning, it still preserves a considerable accuracy rate. It can be intuitively observed that our method far surpasses the baseline methods. This phenomenon indicates that introducing few-shot learning techniques into federated learning systems can improve the system's model training effects in small-sample scenarios.