dataesr/scientific-paragraphs-categorization huggingface dataset:
The classifier was applied to all computed datasets (i. e. , reaction presence, uptake and secretion potential, and internal metabolite production potential), on multiple taxon levels (i. e. , species, genus, family, order, class, and phylum), and on the following scenarios: (i) Pasolli reconstructions only, (ii) Almeida reconstructions only, (iii) Almeida reconstructions using Pasolli reconstructions as the training set, (iv) Pasolli reconstructions using the Almeida reconstructions as the training set, and (v) all APOLLO reconstructions. Classifiers were generated for taxa encompassing at least 125 strains, with a split of 80:20 for training set and validation set (Methods). In most of the considered cases, the generated classifiers were highly predictive on all taxonomic levels and for both reaction presence and predicted metabolic capabilities (Figure  3d ).
For instance, the presence and absence of only 82 out of the 6,319 unique reactions across the Pasolli reconstructions predicted taxonomic assignment on phylum level for 11 phyla with >99% accuracy (Figure  3d ). In fact, all taxonomical levels for the three datasets were predicted with at least 97% accuracy for Pasolli reconstructions (Figure  3d ). Similar predictive potential was achieved for Almeida reconstructions, and for the complete APOLLO resource (Figure  3d ). When the Pasolli reconstruction datasets were used as the training set to develop the classifier, the taxonomy of Almeida reconstructions could be predicted with an accuracy of 86% or higher on most taxonomical levels with only family and genus performing more poorly (Figure  3d ). Similarly high performances were achieved on most taxonomical levels and datasets when using the Almeida reconstruction data as the training set on the Pasolli reconstruction data (Figure  3d ).
Taken together, using a machine learning classifier we demonstrated that, in addition to reconstructions clustering together by taxonomic similarity based on their reaction presence and predicted metabolic capabilities, the same model-specific features were highly predictive of taxonomic assignment on all levels (species to phylum). The Pasolli reconstruction datasets could serve as a training set for the Almeida reconstruction and vice versa to an extent highlighting that the content of both reconstruction resources was overall comparable despite the different sources of input MAGs. For the entire APOLLO resource, 97 out of 6,640 unique reactions could predict the phylum assignment for 11 phyla with >99% accuracy (Figure  3d , Table  S6 ). The confusion matrices demonstrated that four phyla were predicted by the presence and absence of these reactions with 100% accuracy and further four with 99% accuracy (Figure  3e ).
The machine learning classifier identifies features that best stratify microbiomes To address the question whether there exists any metabolic trait that can characterise the different microbiome samples, we defined 11 datasets consisting of two to ten stratification groups, including eight diseases, four body sites, ten countries of origin, and two age groups (Figure  4a , Table  S8 , Methods). We determined the microbiome-level absolute presence and relative abundance of each reaction as well as the relative abundance of subsystems (Methods, Table  S9a -c). We then generated machine learning classifiers to predict group assignments based on relative strain-level abundance, relative reaction abundance, absolute reaction presence, and relative subsystem abundance (Methods, Figure  4a , Table  S10 ).
The nasal cavity, skin, and vaginal microbiomes could be distinguished based on the metabolic model features with 99% accuracy and 97% based on strain-level abundance (Figure  4a ). Inflammatory bowel disease (IBD) and healthy control gut microbiomes could be stratified with 99% accuracy based on two to nine signature features (Figure  4a ). Similarly, the gut microbiomes of Parkinson disease (PD) patients and healthy controls could be distinguished with 92% accuracy (Figure  4a ). Healthy and premature infant gut microbiomes, and gut microbiomes of healthy adults and adults with infection were also well-predicted with 98% accuracy. Group assignments in other datasets were less accurately predicted (Figure  4a ). A clear visual separation into distinct clusters was observed for nasal cavity, skin, and vaginal microbiomes of healthy adults, gut microbiomes of healthy adults and infants, gut microbiomes of healthy and premature infants, gut microbiomes of healthy and undernourished infants, gut microbiomes of healthy adults and adults with infection, and PD and healthy control gut microbiomes (Figure  4b-g ).
Less visual separation was observed for gut microbiomes of healthy individuals by country, of patients with infection with and without antibiotics use, of normal weight and obese individuals, and of individuals with and without type 2 diabetes (T2D) , in agreement with the observed lower predictive potential of the classifiers for these datasets (Figure  4a ). When further analysing the generated machine learning classifiers, we found that the relative abundances of at most 20 reactions were sufficient to accurately predict the stratification group for five of the 11 analysed datasets (Figure  4a ), while the absolute presence of at most 20 reactions accurately predicted the correct group assignment for five datasets (Figure  4a ). For instance, the separation of healthy microbiomes by body site was driven by the relative abundance of only two reactions, i.
Gut microbiomes of PD patients and controls could be stratified by a signature of eight reactions (Figure  4k ). For the remaining dataset, the classifier retrieved a subset of 16 to 100 reactions whose abundance stratified the groups (Figure  S19-S25 ). When plotting the relative abundance of these reactions, distinct clusters were found for healthy adult and infant gut microbiomes, healthy and premature infant gut microbiomes, and adult gut microbiomes with infection and healthy controls (Figure  S19-S21 ). For the stratification of adult gut microbiomes by country, several clusters were identified, which were each enriched in samples from Denmark, the Netherlands, Mongolia, and Tanzania (Figure  S22 ). In the remaining datasets, less clear clustering was observed (Figure  S22 -S25), in agreement with the lower accuracy of the classifier for these datasets (Figure  4a ).
Model-based statistical analyses further reveal differences between groups To further elucidate which reactions were driving the separation in these datasets, we performed a statistical analysis for reaction presence, reaction abundance, and subsystem abundance for the 11 datasets (Table  S11a -c, Methods). After statistical testing, the p-value was corrected for false discovery rate using the Bonferroni method  (Benjamini et al. , 2001). For eight of the 11 datasets, more than 10% of total features were significant after false discovery rate correction (Figure  5a ). In fact, the relative abundances of >90% of the reactions were significantly different between healthy microbiomes by body site, healthy gut microbiomes by country, and between gut microbiomes of healthy individuals and those with infection (Figure  5a ).
In contrast, microbiome models of infection patients with and without antibiotics use, of normal weight, overweight, and obesity, and of T2D and healthy patients showed <10% significance of total features. This result is in line with the above-observed less clear separation of groups in these datasets in UMAP clustering (Figure  S16-S18 ) and the lower prediction potential of the classifier for groups in these datasets (Figure  4a ). It must be noted that for each dataset, a different total number of features was present due to the different number in individual samples included (Figure  4a , Table  S8 ). We then grouped the enzymatic reactions, for which relative abundance was significantly different across the 11 datasets, by metabolic subsystem (Figure  5b ). Metabolic subsystems that made up the biggest contributions to significantly different reactions included xenobiotic metabolism, amino acid metabolism, cell wall biosynthesis, lipid metabolism, carbohydrate metabolism, and vitamin and cofactor metabolism (Figure  5b ).
A similar distribution by metabolic subsystem was seen for enzymatic reactions that were significantly different in absolute presence across the 11 datasets (Figure  S26 ). Finally, we individually visualised the reactions with statistically significant relative abundances for each dataset (Figure  S27-S33 ). Distinct clusters were observed for microbiomes by body site. Equally, distinct cluster were obtained for gut microbiomes of healthy and premature infants, of healthy and undernourished children, and of healthy adults and those with infection (Figures  S27-S30 ). These results were consistent with the clear stratification of these datasets through UMAP clustering (Figures  4b, d, e, g ). For the classification of adult gut microbiomes by country, clusters enriched in samples from Denmark and the Netherlands were observed (Figure  S31 ), in agreement with the independently generated results from the random forests classifier (Figure  S22 ).
A less clear separation based on significantly different reactions was observed for gut microbiomes of obese against normal weight individuals and of T2D patients and healthy controls (Figure  S32 -S33), again in agreement with the random forest classifier (Figures  S24, S25 ). Taken together, for certain comparisons of groups (e. g. , disease states) with matched controls, clear differences in metabolic pathway structure and function were found in our microbiome models, while others could be less clearly stratified. As our models take the relative microbial abundances as input, these findings also reflect that microbiome composition was distinct between groups in some datasets (e. g. , infection vs. healthy) and less different in others (e. g. , T2D vs healthy).
We provided a systematic analysis of reaction and pathway content across 11 different datasets of microbiome samples matched by disease state, body site, geography, or age group. Numerous microbiome datasets, including from nasal cavity, skin, and vaginal microbiomes, healthy adults and infants, healthy and premature infants, and healthy and undernourished children, showed distinct metabolic traits between the groups, which was confirmed independently by UMAP, the random forest classifiers, and statistical analysis (Figures  4, 5 ). Other datasets, such as obese and normal weight individuals, and T2D patients and controls, separated moderately to poorly by group. A reason for the lack of separation may be fewer differences in microbiome abundance between these groups, which consequently translated into fewer differences in metabolic features of the microbiome models that have been parameterised with these relative abundance data (Figure  5a ).
Reaction abundance and presence on microbiome level were determined, and metabolite production potential was computed for a subset of samples. Key differences between groups were identified through machine learning and statistical analyses. Created with BioRender. com. S8 -10. d) Overview of taxonomic assignment for the three datasets and from phylum to species predicted by the random forest classifier. Shown is the accuracy of the predicted taxonomic assignment against the assignment reported by the original authors (where classification was possible). The number of features that were sufficient to achieve the reported accuracy is shown in brackets. The list of classifying features for each prediction is available in Table  S6. e) Normalised confusion matrix for the prediction of phylum assignment based on reaction presence and absence for phyla with more than 125 representatives in APOLLO.
Retrieval of reconstructed genomes The metagenome-assembled genomes (MAGs) used in this study had been published previously  (Almeida et al. , 2019; Pasolli et al. , 2019). Download links for 154,723 MAGs  (Pasolli et al. , 2019)  ("Pasolli" resource) as well as taxonomic assignments for the same genomes were retrieved from https://opendata. lifebit. ai/table/SGB. Another resource of 92,143 MAGs  (Almeida et al. , 2019)  ("Almeida" resource) as well as taxonomic assignments for the same genomes were downloaded from http://ftp. ebi. ac. uk/pub/databases/metagenomics/umgs_analyses/. A further 553 genomes were contained within the Human Gastrointestinal Bacteria Culture Collection  (Forster et al. , 2019) , of which 327 had already been reconstructed as part of the AGORA2  (Heinken et al. , 2023)  resource.
Generation of draft reconstructions Draft reconstructions were created through the KBase  (Arkin et al. , 2018)  online platform in a joint effort by utilising the Narrative interface. To efficiently distribute the effort between all team members, the list of all genomes to reconstruct was divided into batches of 500 to 1,500 genomes through custom MATLAB scripts. For each batch of genomes, draft reconstructions were created by the respective team members through a dedicated Narrative instance. To facilitate this process, a template Narrative (available at kbase. us under https://narrative. kbase. us/narrative/82195) was created and distributed to all team members and consisted of the following steps: (i) download of the assemblies in FASTA format to the Staging Area. For the Pasolli resource, this was performed via the Upload File to Staging from Web -v1.
0. 12 app after retrieving download links from https://opendata. lifebit. ai/table/SGB. For the Almeida resource, genomes were downloaded from http://ftp. ebi. ac. uk/pub/databases/metagenomics/umgs_analyses/, imported in zipped format into the Staging Area, and unpacked through the Unpack a Compressed File in Staging Area -v1. 0. 12 app. (ii) Import of the Assemblies into the Narrative through the Batch Import Assembly from Staging Area app. (iii) Annotation of the imported assemblies through the Annotate Multiple Microbial Assemblies app with the Assembly Set created in the previous step as the input. (iv) Creation of draft metabolic reconstructions from the annotated genomes through the Build Multiple Metabolic Models app with the Genome Set created in the previous step as the input. (v) Export of the created draft reconstructions through the Bulk Download Modelling Objects app.
Development of the machine learning classifier To build a classifier that could predict strain taxonomy based on the strain-specific metabolic features described above, a Random Forest model was chosen to classify the data. The data was divided with an 80:20 split into training and validation groups. The groups were stratified to ensure similar levels of each taxonomic assignment would be present amongst both groups. Hence, taxonomic assignments with few instances were always present in the validation group and that there was no over-abundance of taxonomic assignments with many instances. Gini impurity was used as the feature importance metric. Potential feature redundancy was determined by calculating the Spearman's rank-order correlation for the features. All but one of the closely related features can be removed with minimal impact to accuracy, thus, reducing the dataset size further.
To visualise the separation between strain, linear discriminant analysis (LDA) was used to find an optimum representation of the reduced dataset in three-dimensional space. Uniform manifold approximation and projection for dimension reduction (UMAP)  (McInnes et al. , 2018)  was used to visually show that the dataset has inherent divisibility. The classifier was built in Python version 3. 8. 0 and relied on the pandas, fastai, sklearn, matplotlib and scipymodules.
Taxonomic profiling Taxonomic profiling was performed for a subset of MAGs from the Pasolli resource that had been retrieved from nasal cavity, skin, and vaginal microbiome metagenomes samples originally part of the Human Microbiome Project (HMP)  (Human Microbiome Project, 2012). Abundances of the HMP samples were retrieved. We then divided the HMP samples and the MAGs according to their body origins. For each body origin, a dedicated ad-hoc database was created with the Bowtie2 -build (v 2. 4. 2)  (Langmead and Salzberg, 2012)  function. Each database comprises the MAGs corresponding to the HMP samples for each body source and the genomic sequences used for the AGORA2  (Heinken et al. , 2023)  collection. The raw reads were mapped on the appropriate database using Bowtie2 -q (v. 2. 4. 2)  (Langmead and Salzberg, 2012).
Construction and interrogation of personalised microbiome models Relative strain-level abundances that had been determined in 13,332 gut microbiome metagenomic samples for 1,952 MAGs included in the Almeida resource (UMGS genomes) and 553 human gut reference (HGR) genomes  (Almeida et al. , 2019)  were retrieved from http://ftp. ebi. ac. uk/pub/databases/metagenomics/umgs_analyses/mapping_results/bwa_cover age. csv. Of these 2,505 genomes, genome-scale reconstructions were created for 2,178 in the present study, and 327 had been reconstructed as part of AGORA2  (Heinken et al. , 2023). Genomes from the retrieved abundance data were mapped onto the nomenclature of the corresponding genome-scale reconstructions, and strains with abundances below 0. 001 were removed in the respective samples.
Data visualisation Venn diagrams were generated with the Venn Diagrams online tool (https://bioinformatics. psb. ugent. be/webtools/Venn/). Circle plots were generated through the Circos online tool (http://mkweb. bcgsc. ca/tableviewer/visualize/). UMAP and LDA plots were generated through the Python modules umap-learn (https://umaplearn. readthedocs. io/en/latest/) and sklearn (https://scikit-learn. org/stable/). All other data was visualised in MATLAB version 2021b (Mathworks, Inc. ) and in R version 4. 1. 0 (Team, 2013) using R Studio  (Team, 2020).
Funding This study was funded by grants from the  European Research Council (ERC)  under the European Union's  Horizon 2020 research and innovation programme  (grant agreement No  757922 ) to IT, from the  European Union 's  Horizon 2020 research and innovation programme  under the  Marie Skłodowska-Curie  (grant agreement No  859890 ), from the  National Institute on Aging  grants ( 1RF1AG058942  and  1U19AG063744 ), and from the  Science Foundation Ireland  under Grant number  12/RC/2273-P2. A. B. was the recipient of the  EMBO  short-term fellowship 8720. A. H. received funding from the  Agence Nationale de la Recherche (ANR)  under the decree  2021-1710.
Significantly different features/total number of features across microbiome datasets Dataset Strain abundance Reaction abundance Reaction presence Subsystem abundance Fluxes Adults body sites healthy 332/4,087 7113/7,897 5011/7,897 138/145 Adults healthy by country 1,112/2,141 6786/7,172 2307/7,172 133/134 Adults vs. infants healthy 666/2,300 5092/7,261 2502/7,261 115/134 IBD vs. healthy 359/1,614 4116/7,027 1230/7,027 120/134 21/27 Infants premature vs. healthy 762/1,939 5583/7,243 3700/7,243 126/133 Infants undernourished vs. healthy 9/437 538/6,395 2126/6,395 47/130 8/27 Infection antibiotics vs. no antibiotics 93/1,187 378/7,151 145/7,151 6/133 Infection vs. healthy 1,119/2,255 6978/7,267 3122/7,267 133/134 Obesity vs. normal weight 71/1,390 157/6,970 38/6,970 7/133 PD vs. healthy 31/1,231 980/6,828 359/6,828 27/129 3/27 T2D vs.
We report on the quality of the learnt representation, as well as of state of the art methods, by quantifying their agreement with expert labelled vocalisation types from 8 datasets of other studies across 6 species (birds and marine mammals). With this benchmark, we demonstrate that using auto-encoders improves the relevance of vocalisation representation which serves repertoire characterisation using a very limited number of settings. We also publish a Python package for the bioacoustic community to train their own vocalisation autoencoders or use a pretrained encoder to browse vocal repertoires and ease unit wise annotation.
For instance, Elie et al. [18]  used 22 PAFs extracted using the Biosound package  [24]  to cluster zebra finch (Taeniopygia guttata) vocalisations, Sainburg et al. [25]  used 18 features from the same package to visualise and cluster vocalisations from 20 species, Clink and Klinck  [21]  used Mel Frequency Cepstral Coefficients (MFCCs) to cluster gibbon (Hylobates funereus) calls by individual, and Van Segbroeck et al. [22]  used a gammatone filterbank to cluster mice (Mus musculus) vocalisations. Alternatively, to capture spectro-temporal variations, the concatenation of consecutive spectrogram frames can be used  [25, 26]. Often, we do not know a priori which feature will be the most discriminant for vocalisation types, and high dimensional spaces make similarity measurements difficult (curse of dimensionality).
This motivates using dimensionality reduction algorithms such as Principal Component Analysis (PCA)  [18, 20, 25]  or Uniform Manifold Aproximation (UMAP)  [25] [26] [27]  to emphasise the most 'relevant' features for a given dataset. One important limitation of using PAFs is that there is no generic set that suits all vocal repertoires, and some of the features need specific settings depending on vocalisation frequency ranges or signal to noise ratio (SNR). An opportunity to avoid having to manually choose the right set of features and tune their settings is to use features learnt using deep representation learning (as opposed to handcrafted features like PAFs). Following this approach, auto-encoder artificial neural networks have been used by Goffinet et al. [28]  on mice and zebra finch vocalisations, by Bergler et al.
Datasets In this study, we use 8 different datasets that gather large amounts of timestamped and type labelled vocalisations. These comprise 4 birds and 2 marine mammals species. In most cases, unit classes are shared across recorded individuals, describing a population or species specific repertoire. The exceptions are the bengalese finch datasets which contain individual specific repertoires and the bottlenose dolphin dataset which contains signature whistles  [33]  (signature whistles are not a vocal repertoire but still inform on the relevance of representations for vocalisation categorisation). In these cases, classes are defined as the combination of unit type and individual identity. Table  1  summarises the characteristics of each dataset. In the study by Malige et al. [37]  for which humpback whale vocalisations were originally annotated, around 7,500 vocalisations were labelled by an expert, and to assess inter-annotator disagreements, a second analyst also annotated a sub-set of 1,800 vocalisations, all belonging to recordings of a single day.
Both sets of labels are used in this study separately, with the latter referred to as 'humpback whale (small)'. For some datasets, not all vocalisations were labelled by unit type. Moreover, this paper studies fully unsupervised methods: labels only serve the final evaluation of the yielded clustering. Therefore, to stay close to a realistic scenario of having a potentially noisy set of detected vocalisations, all detections were used in the procedures preceding the evaluation. Additionally, in some cases, classes were highly underrepresented (less than 20 occurrences) or seemed to result from labelling errors. These vocalisations were considered as unlabelled.