dataesr/scientific-paragraphs-categorization huggingface dataset:
Thus, in each communication round, an evaluation of the overall model is performed by each client on its own test data. Once the final model is ready, it is distributed to all clients in the environment to perform inferences. These different steps defines the behavior ot two main roles : the Client role (local workers) and the Server role (central federated server). Algorithms 1 and 2 describe more formally the behavior each of these two roles. In these two algorithms k denotes the index of C clients; B c denotes the size of the local batches; P k denotes the dataset partition for client k; E c denotes the number of iterations performed by the local models; W denotes the model weights; L R denotes the local learning rate, and R denotes the number of communication rounds between the central server and the clients.
Client process (ClientUpdate) This defines the behavior of the different clients in the environment, as well as how they update the initial and later the global model using their local data. In this process, some parameters are initially fixed, namely: the total number of clients C = C i=1 k i ; the number of communication rounds R = R i=1 r i ; the number of epochs E c = E i=1 e i ; the local learning rate L R ; and the size of local batches B c. We therefore vary these differ- ent parameters during our experiments in order to observe the impact of each of them in the different model's performances. To do so, we perform a simulation of a collaborative set of clients who share a dataset with the.
Data description For training and validation of the FL architecture, we used publicly available data from the PlantVillage database. This contains over 50,000 images of healthy and infected plant leaves, divided into 38 categories according to species and diseases. It is a repository of images on plant health, freely accessible and allowing the development of disease diagnostics. In our case, we used data from four types of plants for our different experiments: grapes, apples, corn, and tomatoes. These data are classified according to different categories of healthy and infected leaves. A description of the latter is provided in Table  1. Below are some images of the leaves corresponding to the different classes of each of the four plants. Figure  2  shows images of apple leaves, Figure  3  shows images of corn leaves, Figure  4  shows images of grape leaves, and Fig.
5%. The Mobile-NetV2, Vgg16, and DenseNet121 models also perform well, but slightly worse than ResNet50, with Accuracy and F1-Score averages close to 98%, 97. 7%, and 97. 5%, respectively, for the different client configurations. The Vision Transformer architecture variants ViT_B16 and ViT_B32 underperforms than ResNet50, MobileNetV2, Vgg16, and DenseNet121, with Accuracy and F1-Score averages of 95. 9% and 94. 5 respectively for ViT_B16 and ViT_B32 for different client configurations. The InceptionV3 yields poorer results compared to other models, with an Accuracy and F1-Score of about 92% for 3 clients. Based on the data presented in Table  3 , along with the graphical representations in Figs. 6  and 7  depicting Accuracy and F1-Score respectively, it can be deduced that the ResNet50 architecture, despite its complexity,    6  and  7 also show that ResNet50 achieves better performance than other models after only 5 rounds, thus reducing the training time, and consequently reducing the energy consumption, which is an important advantage in the context of federated learning.
Except for the ResNet50 model, which scales better with an increase in the number of clients, the performance of all other models is lower than that obtained in the 3-and 5-client configurations, probably due to the decrease in the amount of data available for training. From this experiment, we find that overall and from the results obtained, the FL model training process is impacted by the number of clients involved, although the magnitude of this impact varies with each model's architecture. The ResNet50, MobileNetV2, Vgg16, and DenseNet121 models tend to see a decrease in performance as the number of clients increases, although this decrease is relatively small for ResNet50 and MobileNetV2. In other words, these two models demonstrate more resilience towards scaling up the number of clients in federated learning model training.
The ViT_B32, Vgg16 and ViT_B16 models also achieve good performance, although lower than the ResNet50, DenseNet121 and MobileNetV2 models. When the number of epochs increases to 5, these models significantly improve their performance, with an almost identical F1-Score and Accuracy of 98. 75% for Vgg16 and ViT_B32, and a F1-Score and Accuracy of 98. 15% for ViT_B16. This suggests that these models require more local computation time to learn more about the data to improve their performance. The InceptionV3 model performed worst compared to the other architectures studied, with a F1-Score of 91. 76% and Accuracy of 92. 22% for epochs=1, and 96. 82% and 96. 81% for epochs=5. This model might not be a good choice in the context where computation time and quality of accuracy in classification are priorities.
Indeed, it manages to reach a F1-Score and an Accuracy of 100% on the Grape dataset. The ViT_B16 model also performs well, slightly less than ResNet50, but slightly better than the other models on the Grape, Apple and Tomato datasets. More precisely, it obtains respectively a F1-Score and Accuracy of 98. 57% and 98. 56% on the Grape dataset, a F1-Score and Accuracy of 98. 57% and 98. 56% on the Apple dataset, and finally a F1-Score and Accuracy of 92. 57% and 93. 57% on the Tomato dataset. The Vgg16 and ViT_B32 models show almost similar performance on the Grape, Apple and Corn datasets. However, these performances are slightly lower than those of ResNet50 and ViT_B16. The F1-scores and Accuracies obtained by the two models are close to 98. 2% for the Grape dataset, 98% for the Apple dataset, and 95% for the Corn dataset respectively.
MobileNetV2 and DenseNet121 also perform well, varying by dataset, and slightly worse in most cases than ResNet50, ViT_B16, Vgg16 and ViT_B32. The InceptionV3 model performs poorly overall, compared to the other models tested, regardless of the dataset. InceptionV3 performs worse than all other models, but peaks on the Grape dataset with a F1-Score and Accuracy of 96. 11% and 96. 20% respectively. We found that the majority of models exhibit superior performance, with very high F1-Score and Accuracy on the Grape dataset. This could mean that the images in this dataset are easier to classify, by the simple fact that they are overall sharper and have a better representation of the different classes. The performance of the models on the Tomato dataset is generally the poorest, compared to the other datasets.
Although these images are of lower quality than the Grape dataset, it is clear that they are more difficult for the models to classify. Since the size of the Tomato dataset and the number of classes (10 classes) are significantly larger than those of the other datasets, the poor performance of the deep architectures on this dataset could be explained by the fact that the distribution of examples between classes is less balanced, thus making the classification task more difficult. It could also be due to the fact that the models need more examples to learn the discriminative features of the different  classes of tomato leaves. Since the size and number of classes for this dataset is larger, we believe that tuning the hyperparameters taking into account the size of this dataset could improve the performance of the models.
The Apple and Corn datasets have the same number of classes (4 classes) and almost similar sizes as the Grape dataset. Due to the simpler distribution of classes and the size of these datasets, the deep architectures benefit from fast learning, which justifies the good performance of the models on these datasets, unlike the Tomato dataset. However, the variation in performance on the Grape, Apple, and Corn datasets could be due to the difference in data quality between these datasets. Thus, we have models that might be more robust to variations in data quality, while others are not. As an example, apart from the ResNet50 model, we can see through the results in Table  6  that the vision model ViT_B16 (see also ViT_B32) is only slightly impacted by data variations by offering slightly lower performances than ResNet50 compared to the other models for most datasets.
The robustness of these models in this case is certainly explained by the use of attention mechanism. This mechanisms allow this type of model to capture information at different scales and levels of abstraction, thus improving their ability to learn more general and abstract visual features from the input images. Compared with the results obtained by the CNNs in  3, 8, 18  , as well as the models based on attention mechanisms in  20, 21  which used the centralized approach and the "PlantVillage" platform datasets, we note that these results are close to those obtained in our work with the FL decentralized approach. In other words, in addition to its many advantages, FL is capable of performing the same tasks and obtaining results almost identical to those obtained with the centralized approach.
Conclusion The use of machine learning technologies, in particular those based on Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs), for crop disease classification is an evolving field. Thus, in this research, we explored the application of federated learning (FL) in this context, a new paradigm that has been underexplored in this field despite its numerous advantages regarding the security of user data and the preservation of confidentiality of sensitive data. Several important partial conclusions were drawn from the experiments conducted. First, the performance of the models trained through the FL process is influenced by the number of clients involved, with ResNet50 and MobileNetV2 proving to be more robust to an increase in the number of clients and more suitable for a federated learning scenario.
Second, the number of communication rounds has an impact on the performance of the deep architectures, where ResNet50 proved to be an optimal choice for a balance between performance, computational cost, and model complexity. In addition, increasing the number of epochs locally for each client generally improves the performance of all models studied, with ResNet50 providing the best performance. The ViT_B16 and ViT_B32 Vision Transformers, while offering better performance than some CNNs, require more computational time, making them less suitable in a FL scenario. Finally, the performance of the deep models varies with each dataset, with significant differences depending on the quality of the data and the number of classes in each dataset. It is clear that federated learning has a crucial role to play in crop disease classification.
Acknowledgements This work is funded as part of the  MERIAVINO  project. MERIAVINO  is part of the  ERA-NET Cofund ICT-AGRI-FOOD , with funding provided by national sources [ ANR France ,  UEFISCDI Romania ,  GSRI Greece ] and co-funding by the  European Union 's  Horizon 2020 research and innovation program , Grant Agreement number  862665.
Besides, whole-genome sequencing has also been used for quantitative-trait loci (QTL) mapping of economically important traits  [16] [17] [18]  , as well as genome-environment associations to identify local adaptations  [19] [20] [21]. Despite the decreasing costs of genome-sequencing, large-scale population genomics studies are still not feasible for all labs, and thus, studies are often limited by sample size  7. Large sample sizes are especially important to increase power for genotype-phenotype associations  22, 23. Moreover, accuracy of QTL mapping and genome-wide associations studies greatly benefit from a haplotype-resolved dataset  24, 25  , in particular, to identify structural variation  26, 27. For honey bees, structural variation has been shown to be characteristic in the differentiation of subspecies and local adaptation  8, 28  , but accurate phasing empowered by a large haplotype reference is necessary -in particular due to the honey bee's high recombination rate  29.
More recently in other species, pangenomes are emerging as a powerful tool to characterise structural variation opening up previously inaccessible genomic regions  30, 31. The development of a pangenome for the honey bee would therefore benefit from a large and diverse dataset of reference haplotypes. For these reasons, we have collated and curated whole-genome sequence data from 1,407 drones representing a diverse range of subspecies, habitats and geographic origins, into an accessible genomic resource: AmelHap. The key aims of AmelHap are to support genotype imputation, haplotype phasing and act as a comprehensive reference panel, similar to the human International HapMap Project  32. Significant advantages of A. mellifera for such a project include its small genome size (225. 25 Mb; Amel_HAv3.
1) and the availability of haploid drones whose alleles are naturally phased. The resource will be useful for a variety of applications, including for example: imputation of low-depth sequence or SNP array data to enable cost-efficient large-scale studies; accurate phasing of diploid genomes to facilitate haplotype-based analyses such as XP-EHH;  33  recovery of host genomic data from suboptimal samples (such as bee hive products  34  , metagenomic  35  , historic or ancient DNA  14  ); identification of ancestry informative markers or tag-SNPs; validation of reduced SNP panels; and to serve as a comprehensive reference panel to support studies on population and evolutionary genetics. Herein, we i) describe the details of the AmelHap dataset including sample origins and sample strategies, ii) outline step-by-step our sequence processing pipeline, and iii) validate AmelHap on its performance for genotype imputation in a haploid and diploid dataset.
We have created a Zenodo community (https://zenodo. org/ , 73 from South Africa and the South West Indian Ocean  5, 36  , 125 from North America 37 , 13 from Asia, and 40 from Oceania  8. In addition to representatives of the 8 subspecies listed, the dataset comprises various hybrids including Buckfast and experimental populations from Canada and Gotland. An overview of the sample origins can be found in Supplementary Table  1 , and further details on each dataset are provided below.
Sample origins. PRJNA311274  38  : This Bioproject includes a large number of drones sequenced for the French research project SeqApiPop -an initiative to characterise the genetic diversity of French honey bees that not only included populations from France but also reference samples from several other countries. To date, 3 studies have been published within the scope of SeqApiPop. An initial pilot study investigated selection signatures in commercial honey bee populations  11. This included sequence data for 30 unrelated drones selected for royal jelly and another 32 for honey production, as well as 30 A. m. mellifera drones from the island of Ouessant, 12 A. m. carnica from Germany and 18 A. m. carnica from Slovenia. A second study, explored admixture between European and African honey bees in the South West Indian Ocean islands  5.
m. carnica from breeders and breeder organizations, A. m. caucasia and Buckfast from breeders in France, A. m. iberiensis from beekeepers in Spain, A. m. ligustica from breeders in Italy, as well as a large number of drones of hybrid genetic ancestry. These samples also include a large number from a Varroa-resistance study  39  in Vaucluse (France) labelled the MOSAR experiment. PRJNA596071  40  : Sequence data of 61 unrelated drones obtained from this study were sampled across Austria, Germany, Slovenia, Switzerland and Norway  16. These include representatives of A. m. carnica and A. m. mellifera from international breeding and conservation programmes. The drones were sequenced in the frame of the development of a SNP array for genomic selection. PRJNA363032  41  : Sequence data for 125 drones from Canada was sourced from a study of hygienic behaviour  37.
Drone larvae were sampled randomly from selected and control populations, averaging 3. 1 drones per colony, totaling 41 colonies. Canadian honey bees are highly admixed, but derive predominantly from the C and M lineages  42. Drones were sampled from the third generation of two artificially selected populations based on increased hygienic behaviour, as well as from an unselected baseline population. PRJNA516678  43  : Sequence data for 158 drones from 8 colonies each on the islands of Gotland (Sweden) and Åland (Finland), in addition to 57 drones from 6 colonies in South Africa (A. m. capensis, n = 28; A. m. scutellata, n = 29), was sourced from a study of recombination  36. Between 8 and 10 drones were sampled per colony across 22 colonies. The samples from Gotland originate from a natural selection experiment between 1997-1999, in which 150 colonies were introduced to the island, artificially infested with the mite Varroa destructor, and left unmanaged in a "live and let die" experiment referred to as the "Bond Project"  44, 45.
The bulk of colonies introduced from Sweden were described as Buckfast, a hybrid strain mainly derived from the C lineage, in addition to 10 queens each sourced from Swedish A. m. carnica and A. m. mellifera breeders  44. The Åland bees were described as typical managed honey bees, containing a mixture of European ancestry  36. PRJEB16533  46  : Sequence data of 119 unrelated drones, each sampled from a different colony, was retrieved from a study on conservation genomics in Switzerland  4. Of these, 39 A. m. mellifera drones were sampled from Swiss conservation areas, while A. m. carnica drones (n = 33) and Buckfast drones (n = 14) were obtained from breeders and breeder associations of the respective strains. PRJNA578233 47 : This project accession, which has no associated publication, comprises three A.
7. 17. Reads were sorted with SAMtools 52 v1. 9 and duplicates marked (MarkDuplicates) with GATK 53 v4. 0. 11. 0. Variants for each sample were called using GATK's HaplotypeCaller  54  with the following non-default parameters-ERC GVCF,-sample-ploidy 1 and -A AlleleFraction. Joint variant calling was performed across all samples using GATK's GenomicDBImport and GenotypeGVCFs withsample-ploidy 1 and a window size of 2. 5 Mb. The pipeline is implemented in BAGPIPE (https://bitbucket. org/ renzo_tale/bagpipe/). Across the 1,407 drones we identified 21,203,582 variants. This included 15,847,428 SNPs, 6,316,757 INDELs, 1,139,661 other variant types (e. g. complex substitutions), and 5,126,225 multiallelic sites of which 2,324,214 were multiallelic SNPs. The mean genotype depth of coverage (DP) for these variants across sample-level averages was DP = 7.
After masking these genotypes and removing variants with a non-reference allele frequency (AF) of zero (filter 3) there remained 18,152,805 variants across the 1,407 drones. Applying to these high-quality variants a minimum 90% threshold for sample and variant call rates (filter 4) returns 1,328 samples and 17,414,346 variants, which forms the AmelHap (v1. 1. 1) dataset. Genetic identity of samples and population structure. We analysed pairwise identity by state (IBS) and genetic admixture to validate if these corroborated with reported or expected relationships. Prior to performing these analyses, we first filtered to retain variants with a minor allele frequency (MAF) >1% (bcftools view -f. ,PASS-min-af 0. 001:minor), then removed variants in strong linkage disequilibrium (r 2 > 0. 1) using bcftools + prune by considering pairs of variants up to 10 kb apart (-max 0.
1 -window 10 kb). This left 660,258 records comprising 513,322 SNPs and 152,810 INDELs, including 31,921 multiallelic sites of which 2,980 were multiallelic SNPs. Using the LD filtered dataset, we generated an IBS matrix with Plink 56 v1. 90p (-distance square gz ibs). From this, we observe clear clustering of samples corresponding to C, M, and A lineage ancestries, as reported within the respective studies from which the samples were sourced (Fig. 2 ). In addition, we observe clusters of very closely related samples or siblings (dark blue squares along the diagonal in Fig. 2 ), most of which correspond to drones sampled from the same colony. To further investigate this point, we plotted the distribution of pairwise IBS values and colored them according to their reported relationship, i. e.
These outliers represent a very small proportion of unrelated drone pairs (0. 66%). The higher genetic relatedness among these samples is not unexpected due to the composition of the dataset -which includes drones from several breeding programmes, single apiaries and isolated or experimental populations (Supplementary Table  1 ). For end-user convenience, we have labelled outlier drones which return more than 3 high IBS values (column 'IBS Risk' in metadata  57 ). Pairwise IBS values between the unrelated drones are roughly distributed across two dominant peaks (Fig. 3 , blue). Considering only the 317 drones whose evolutionary lineage was reported, the majority of pairs (54. 9%) under peak 1 involve comparisons between drones reported to be from different lineages, while drone pairs under peak 2 are dominated by within-lineage comparisons (83.
6%). Although these figures are skewed to an extent by the limited sample representation for each lineage, they broadly demonstrate that the IBS peaks correlate with genetic divergence between and within lineages as reported in previous studies  7, 9. We next evaluated the overall genetic structure of AmelHap by calculating global ancestry estimates (Q) with ALStructure 58 (https://github. com/StoreyLab/alstructure) using default settings. ALStructure unifies PCA-based and likelihood-based methods for estimating ancestry by first clustering the data using latent subspace estimation (LSE), a method similar to PCA, and then estimating a sample's global ancestry proportions using the alternating least squares (ALS) method to transform the allele frequencies obtained from LSE. We ran ALStructure on the LD filtered dataset for K = 2 to 6 dimensions and applied the structural Hardy-Weinberg Equilibrium (sHWE) test  59  to generate p values from each K run using 3 null datasets.
For the purpose of the sHWE test, missing genotypes were set to 0. 5 as the function cannot process matrices with missing data. The resulting sHWE p values were applied to the entropy-based procedure described by Hao and Storey  59  , in order to determine the optimal K. The resulting entropy values for K = 2 to 6, respectively, were 763, 766, 768, 769, and 770, which, although indicating K = 2 to be optimal, demonstrates only marginal difference at these K levels. We present the results of K = 3 and K = 4 (Fig. 2 ) based on there being four reported lineages within the dataset with the caveat that one of these lineages (O) is poorly represented. Global ancestry estimates at K = 3 corroborate the reported sample lineages A, C and M (Fig. 2 ), with the few representatives of the O lineage (A.
Data Records Sequence data generated in this study have been deposited under project accession code PRJEB39369  49. ENA accession numbers to individual sequence data are deposited at Zenodo 57 , listing all 1407 drone sequences processed in this paper alongside sample metadata (i. e. sample origin, siblings, reported type/subspecies) and variant filtering metrics (i. e. genotype depth and missingness). Raw gVCF files for all samples grouped by project accession  [60] [61] [62] [63] [64] [65] [66] [67]  , along with joint-called raw variants  [68] [69] [70] [71] [72] [73] [74]  across samples from these project accessions are available from the AmelHap community on Zenodo (https://zenodo. org/communities/amelhap; Supplementary Table  2 ). The AmelHap_1. 1. 1. f4  75 VCF file follows filter 4, and includes common variant INFO (AC, AF, QD, etc.