dataesr/scientific-paragraphs-categorization huggingface dataset:
Over an Asselian to Rhaetian timespan (i. e. between 298. 9 and 201. 3 Ma), we compiled and analysed a new dataset of over 17,250 worldwide insect occurrences, vetted at the species level for 1784 genera and at the stage-or formation-level for ages. Relying on a Bayesian framework that estimates process-based birth-death models while incorporating the preservation process and uncertainties associated with fossil occurrences  36, 37  , we investigated whether and to what extent origination (speciation at the genus level) and extinction rates responded to environmental changes throughout the period encompassing putative sudden and strong extinction events (i. e. CPE, LPME and GEE). We simultaneously assessed the effect of diversity changes between three or four guilds (herbivores, predators, detritivores/fungivores, and generalists; the last two were merged in a guild dubbed 'others' in the three-guilds model) on their origination and extinction rates by quantitatively investigating the roles of diversity dependence among insect clades throughout the Permian and Triassic periods.
Unexpected and heterogenous extinctions during the Permian and Triassic Our fossil dataset included 14,483 occurrences assigned at the family level representing 418 families and 14,789 occurrences assigned at the genus level representing 1784 genera (Supplementary Data 1: Genus_level). We inferred the diversification history of insects relying on both the birth-death model with constrained shifts (BDCS  38  ) and the reversible-jump Markov Chain Monte Carlo model (RJMCMC  37  ), both at genus and family levels. Previous studies have suggested important extinctions of insect families during the Guadalupian or the LPME but have never investigated the decline of insects at the genus level  7, 21, 23, 39. The genus-level analyses revealed that the diversity dynamic of insect genera declined three times between the Guadalupian and the Late Triassic (Fig.
Limitations We have investigated the past dynamic of insect diversification based on the fossil record and Bayesian inferences. Although powerful, this approach has limitations either related to the dataset or to the analytical methods. First, a major issue when studying fossil insects is the poor delineation of several clades, at all systematic levels (e. g. order: 'Grylloblattodea', genus: Geinitzia Handlirsch). Some lineages serve as taxonomic wastebaskets and their composition greatly varies depending on the authors  88, 89. This limitation is particularly important Colour and abbreviations as in Fig. 1. Silhouettes from http://phylopic. org/. Gnetophyta (by Curtis Clark and T. Michael Keesey), Polypodiales ferns (by Olegivvit) licences at https://creativecommons. org/licenses/by-sa/3.
Fourth, our results depend on the choice and availability of environmental and biological variables used as putative diversification drivers. We focused on eight candidates (non-related to diversity dependence) reflecting widespread environmental changes as likely factors that could have influenced the diversification of insects. Additional factors could be at play, such as volcanism or changes in rainfall frequency and intensity  12  and would deserve attention in the future. Fifth, the ecology of numerous fossil insects is unknown or hypothetical, hampering our understanding of biotic interactions in the deep past. Similarly, because the ecology is simplified into broad categories  91, 92  or sometimes unknown, conclusions can be flawed. Nonetheless, because of the size of our dataset and the conservatism of our investigation, our results should be relatively robust and provide testable conclusions.
Fossil record of insects We compiled all species-level fossil occurrences of insects using https://paleobiodb. org/ (PBDB) as a starting point (downloaded October 12, 2021). The dataset obtained from PBDB contained initially 5808 occurrences for a period ranging from the Asselian to the Rhaetian. The dataset was cleaned of synonyms, outdated combinations, nomina dubia, and other erroneous and doubtful records, based on revisions provided in the literature and/or on the expertise of the authors. After correction, including data addition from the literature, our dataset was composed of 3636 species (1784 genera, and 418 families) for 17,250 occurrences resulting from an in-depth study and curation of the entire bibliography of fossil insects, spanning from the Asselian (lowermost Permian) to the Rhaetian (uppermost Triassic).
Although most of the taxa included in the datasets are nominal taxa (published and named), a few unnamed taxa (genera or species) that are considered separate from others were also included, although not formally named in the literature or not published yet. These unpublished taxa are identifiable by the notation 'fam. nov. ' or 'gen. nov. ' following their names. Occurrences used here are specimens originating from a given stratigraphic horizon assigned to a given taxon. The age of each occurrence is based on data from PBDB, corrected with a more precise age (generally stage, sometimes substage), and the age of each time bin boundaries relies on the stratigraphic framework proposed in the International Chronostratigraphic Chart (updated to correspond with the ICS 2022/02  95  ). Similarly, the ages of some species assigned to the wrong stage were corrected.
In fact, some species from the French Permian deposit of Lodève were initially considered to be of Artinskian age in PBDB but most species from this deposit originate from the Merifons member, which is of Kungurian age  96. Our data compilation allows a robust integration of data before and after our period of interest (i. e. the lower Permian and all geologic stages after the Carnian) to encompass occurrences of genera that may survive until the Late Triassic and to generate a sufficient background for the model to correctly estimate the extinction events around the P/ T boundary. Since we used different datasets, the differences between genus-level or family-level occurrence numbers are explained by the systematic placement of some specimens that can only be placed confidently in a family but not in a genus (Supplementary Table  1 ).
Tentative species identifications originally placed with uncertainty (reported as 'aff. ' or '?') were always included at a higher taxonomic level. Uncertain generic attributions were integrated as occurrences at the family level (e. g. a fossil initially considered Tupus? is recorded as an occurrence of Meganeuridae). Our total dataset was subdivided into smaller datasets, which represent orders or other subclades of insects (e. g. Mecoptera, Holometabola and Polyneoptera). Note that all the ichnospecies-a species name assigned to trace fossils (e. g. resting trace, nest and leaf damage)-and insect eggs (e. g. Clavapartus latus, Furcapartus exilis and Monilipartus tenuis) were not included in the analyses  97. To prevent potential issues regarding the diversification estimates for clades with poor delineation, we refrained from analysing several orders that serve as taxonomic 'wastebaskets' (e.
g. Grylloblattodea). These groups are poorly defined, likely polyphyletic or paraphyletic, and not supported by apomorphic characters-e. g. the monophyly of the 'Grylloblattodea' (Grylloblattida Walker, 1914 plus numerous fossil families and genera of uncertain affinities) is not supported by any synapomorphy, nor the relationships within this group. The occurrences assigned to these orders were rather included in analyses conducted at a higher taxonomic level (at the Polyneoptera level in the case of the 'Grylloblattodea'). The detail of the composition of all the datasets is given in Supplementary Table  14 , and each dataset is available in Supplementary Data 1. Studying extinction should, when possible, rely on species-level diversity to better circumscribe extinction events at this taxonomic rank, which is primarily affected by extinction  [98] [99] [100].
However, in palaeoentomology, species-level occurrence data may contain less information than genus-level data, mainly because species are most of the time only known from one deposit, resulting in reduced life span, and are also sometimes poorly defined. Insects are also less prone to long-lasting genera or species than other lineages, maybe because of the relatively short time between generations (allowing for rapid evolution) or because morphological characters are better preserved or more diagnostic than in other lineages (i. e. wing venation), allowing easier differentiation. Another argument for the use of genus-level datasets is the possibility to add occurrences represented by fossils that cannot be assigned at the species level because of poor preservation or an insufficient number of specimens/available characters.
By extension, the genus life span provides clues as to survivor taxa and times of origination during periods of post-extinction or recovery. A genus encompassing extinction events indicates that at least one species of this genus crossed the extinction. To get the best signal and infer a robust pattern of insect dynamics around the P/T events, we have chosen to analyse our dataset at different taxonomic ranks (e. g. genus, family and order levels) to extract as much evidence as possible. To further support our choice to work at these different levels, most recent works aiming to decipher the diversification and extinction in insect lineages have worked using a combination of analyses  21, 22, 26  ; this also applies to non-insect clades  51, 101, 102. This multilevel approach should maximise our understanding of the Permo-Triassic events.
Assessing optimal parameters and preliminary tests Prior to choosing the settings for the final analyses (see detail in Dynamics of origination and extinction), a series of tests were carried out to better evaluate the convergence of our analyses. First, we analysed our genus-level dataset with PyRate 36 running for 10 million generations and sampling every 10,000 generations, on ten randomly replicated datasets using the reversible-jump Markov Chain Monte Carlo (RJMCMC) model  37  and the parameters of PyRate set by default. As the convergence was too low, new settings were used, notably increasing the number of generations to 50 million generations and monitoring the MCMC mixing and effective sample size (ESS) each 10 million generations. We modified the minimal interval between two shifts (-min_dt option, testing 0.
5, 1. 5 and 2), and found no major difference in diversification patterns between our tests. We have opted for 50 million generations with a predefined time frame set for bins corresponding to the Permian and Triassic stages, and a minimum interval between two shifts of two Ma. These parameters allow for maintaining a short bin frame and high convergence values while correctly identifying periods of diversification and extinction. For each analysis, ten datasets were generated using the extract. ages function to randomly resample the age of fossil occurrences within their respective temporal ranges (i. e. resampled ages are randomly drawn between the minimum and the maximum ages of the geological stratum). We monitored chain mixing and ESS by examining the log files in Tracer 1. 7. 1  103  after excluding the first 10% of the samples as a burn-in period.
Dynamics of origination and extinction We carried out the analyses of the fossil datasets based on the Bayesian framework implemented in the programme PyRate  36. We analysed the fossil datasets under two models: the birth-death model with constrained shifts (BDCS  38  ) and the RJMCMC (-A 4 option 37 ). These models allow for a simultaneous estimate for each taxon: (1) the parameters of the preservation process (Supplementary Fig. 17 ), (2) the times of origination (Ts) and extinction (Te) of each taxon, (3) the origination and extinction rates and their variation through time for each stage and (4) the number and magnitude of shifts in origination and extinction rates. All analyses were set with the best-fit preservation process after comparing (-PPmodeltest option) the homogeneous Poisson process (-mHPP option), the non-homogeneous Poisson process (default option), and the time-variable Poisson process (-qShift option).
As explained above, the minimal interval between two shifts (-min_dt option) was modified and a value of 2 was used. The default prior to the vector of preservation rates is a single gamma distribution with shape = 1. 5 and rate = 1. 5. We reduced the subjectivity of this parameter, and favoured a better adequation to the data, allowing PyRate to estimate the rate parameter of the prior from the data by setting the rate parameter to 0 (-pP option). Therefore, PyRate assigns a vague exponential hyperprior to the rate and samples the rate along with all other model parameters. Similarly, because our dataset does not encompass the entire fossil record of insects, we assumed that a possible edge effect may interfere with our analyses, with a strong diversification during the lowermost Permian and, conversely a strong extinction during the uppermost Triassic.
We replicated all the analyses on ten randomly generated datasets of each clade and calculated estimates of the Ts and the Te as the average of the posterior samples from each replicate. Thus, we obtained ten posterior estimates of the Ts and Te for all taxa and we used these values to estimate the past diversity dynamics by calculating the number of living taxa at each time point. For all the subsequent analyses, we used the estimated Ts and Te of all taxa to test whether or not the origination and the extinction rate dynamics were correlated with particular abiotic factors, as suggested by the drastic changes in environmental conditions known during the Permo-Triassic. We used proxies for abiotic factors, such as global continental fragmentation or the dynamic of major clades of plants, and for biotic factors via species interaction within and between ecological guilds.
These simulations were based on datasets simulated under a range of potential biases (i. e. violations of the sampling assumptions, variable preservation rates, and incomplete taxon sampling) and reflecting the limitations of the fossil record. Simulation results showed that PyRate is able to correctly estimate the dynamics of origination and extinction rates, including sudden rate changes and mass extinction, even if the preservation levels are low (down to 1-3 fossil occurrences per species on average), the taxon sampling is partial (up to 80% missing) or if the datasets have a high proportion of singletons (exceeding 30% of the taxa in some cases). The strongest bias in birth-death rate estimates is caused by incomplete data (i. e. missing lineages) altering the distribution of taxa; a pervasive effect often mentioned for phylogeny-based models  [104] [105] [106].
The severity of extinctions and survivors For each event-the Roadian-Wordian, the LPME, and the Ladinian-Carnian-we quantified the percentage of extinctions and survivors at the genus level. We used the Te and Ts from our RJMCMC analysis and computed the mean for the Te (Te m ) and for the Ts (Ts m ) of each genus. We then filtered our dataset to keep only the genera with a Ts m older than the upper boundary of the focal event, i. e. , we only kept the genera that appeared before the end of the event. Then, we discarded the genera that have disappeared before the lower boundary of the focal event, i. e. Te m older that the lower boundary of the event. The remaining genera, which corresponds to all the genera (total) present during the crisis (Tt gen ), can be classified into two categories, 'survivor genera' (S gen ), i.
We replicated the analyses on ten randomised datasets and combined the posterior estimates across all replicates. We estimated the shape (Φ) and scale (Ψ) parameters of the Weibull distribution, and the taxon longevity in a million years. According to ref. 50, there is no evidence of age-dependent extinction rates if Φ = 1. However, the extinction rate is higher for young species and decreases with species age if Φ < 1, and extinction rates increase with species age if Φ > 1. Although ADE models are prone to high error rates when origination and extinction rates increase or decrease through time, simulations with PyRate have shown that fossil-based inferences are robust  50. We investigated the effect of ADE during three different periods (-filter option) as follows: (1) between 264. 28 Ma and 255 Ma (pre-decline), (2) between 254.
Therefore, we investigated the potential correlation of the variations of this variable with insect dynamics using data from ref. 55. We extracted the data, with 1-million-year time intervals, spanning the Permo-Triassic. Similarly, the modification of CO 2 concentration, notably its increase, is known to promote speciation in some modern insect groups  107. Therefore, a similar effect may have occurred during the Permian and Triassic but remains to be tested. We based our analyses on the dataset of ref. 108. We used their cleaned dataset and extracted all verified values for the Permo-Triassic interval. Because the initial data (i. e. independent estimates) were made in various locations for the same age, different values of the CO 2 concentration are provided. We incorporated all these values in our analysis, allowing PyRate to search for a correlation for each value of the CO 2 concentration.
The fluctuation in relative diversity of gymnosperms, non-Polypodiales ferns, Polypodiales ferns, spore-plants, and later the rise of angiosperms has likely driven the diversification of numerous insects  57, 60, 61, 114. Close interactions between insects and plants are wellrecorded during the Permian and Triassic  57, 60, 61. In fact, herbivorous insects are known to experience high selection pressure from bottomup forces, resulting from interactions with their hosts or feeding plants  30, 72. Therefore, it appears crucial to investigate the effect of these modifications on the insects' past dynamics. We used the data from ref. 38 for the different plant lineages (all with 1-million-year time intervals). All the datasets for these variables are available in the publications cited aside from each variable or in Supplementary Data 1.
Some hemipteran families (e. g. Nabidae) are predators and we cautiously distinguished herbivorous and carnivorous taxa among Hemiptera. The detail of the ecological assignations for the 1009 genera included in our analyses can be found in Supplementary Data 1 (Table  MCCD ). We calculated ten diversity trajectories from the ten replicated analyses under the RJMCMC model. The estimation of past species diversity might be biased by low preservation rates or taxonomic uncertainties. However, such trajectory curves are likely to provide a reasonably accurate representation of the past diversity changes in the studied clades, notably because the preservation during the Permian and Triassic period is relatively good for insects (i. e. no gaps). Our MCDD analyses comprise all the insect genera spanning from the lowermost Permian to the uppermost Triassic and were run and repeated on ten replicates (using the Te and Ts estimated under the RJMCMC model) with 50 million MCMC generations and a sampling frequency of 50,000.
Data availability The data generated in this study are provided in Supplementary Data 1. The datasets used for the RJMCMC and BDCS analyses, all the guilds assignations for the MCDD analyses, all the paleoenvironmental variables used for the MBD model, and all the references used to build the different datasets can be found in Supplementary Data and have been deposited in the Figshare digital data repository (https://doi. org/10. 6084/m9. figshare. c. 6296196. v2). Source data are provided as a Source Data file. Source data are provided with this paper.
Implementation and Results We now retrace the steps of the Ansatz construction algorithm presented in Section 4, and provide details regarding their implementation. To perform the algebro-geometric operations we make extensive use of the computer algebra system Singular  [57]  through its Mathematica interface  [72]  and through the Python interface syngular  [73]. We note a generally useful facility in Singular: the qring declaration. This allows one to work directly in the quotient rings R n and R n. Let us start from the analytic study of codimension-one and codimension-two varieties. For one primary decomposition, we used the algorithm of Gianni, Trager and Zacharias  [62]  as implemented in Singular under the command primdecGTZ. For the other decompositions, we supplemented this algorithm with the techniques described in Appendix B.
To remove sub-varieties, we made use of the command sat, as described in Appendix B. 1. To check primality, we made use of the test presented in Appendix B. 3. For the numerical warm-up, we implemented in Python both the algorithm for generating finite-field points on irreducible varieties, described in Section 3. 2, and the lifting procedure to obtain p-adic solutions close to singular varieties, described in Section 3. 3. The required Remainder R maximally independent sets were computed with the Singular command indepSet. In order to solve the univariate polynomial equations of Eq. (3. 24) over a finite field, we used the command factor from the package sympy  [74]. In practice, we observed that it is always possible to choose a maximally independent set such that the system of equations for the dependent variables is linear, which guarantees the existence of a solution in F p.
For all helicity amplitudes, we observe a large decrease in the size of the Ansatz when applying our procedure. As a result of using this Ansatz, we therefore find a large reduction in the size of the expressions for the rational functions in the helicity amplitudes. We provide our results in the form of ancillary files of two types: (a) Machine-readable expressions for the primary decompositions of Eqs. (5. 7) to  (5. 12)  and, in particular, for the generating sets for the associated prime ideals. These can be found in the files generatingIdeals. m and generatingIdeals. py, in the languages Mathematica and Python 3. 8 respectively. The Python file also computationally checks the equalities in Eqs. (5. 7), (5. 9) and  (5. 11). Furthermore, it employs the method described in Appendix B. 3 to check the primality of all ideals P i in Section 5.
1. (b) Expressions for the rational functions in the helicity amplitudes. The appropriate helicity configuration and N f power are encoded in the first part of the file names, each taking the form 2l_{helicity configuration}{Nf power} where {helicity configuration} refers to the subscript h from Eq. (5. 1) and can be either pmmpp or pmppp, i. e. one of the two independent helicity configurations; and where {Nf power} refers to the j superscript in Eq. (5. 1), it is blank for j = 0 or _nf for j = N f. These files are arranged into two classes: (b. 1) Files ending in _coo. json contain the sparse matrices M ji from Eq. (5. 4). The term coo refers to the notation used to store the matrix, which is the coordinate list format, i. e. a map from tuples of indices (j, i) to the values M ji for all non zero entries of the matrix.
Acknowledgements We thank  Samuel Abreu ,  Gauthier Durieux ,  Harald Ita ,  Fernando Febres Cordero ,  David Kosower ,  Daniel Maître  and  Vasily Sotnikov  for useful discussions and/or collaboration on related topics. We thank  Harald Ita ,  Daniel Maître  and  Vasily Sotnikov  for comments on the draft. This project has received funding from the European's  Union Horizon 2020 research and innovation programme LoopAnsatz  (grant agreement number  896690 ) as well as the  French Agence Nationale pour la Recherche , under grant  ANR-17-CE31-0001-01.