dataesr/scientific-paragraphs-categorization huggingface dataset:
Introduction The advent of high-performance computing has paved the way for advanced analyses of high-dimensional datasets  (Jordan and Mitchell, 2015; LeCun et al. , 2015). Those successes have naturally raised the question of whether it is possible to learn the behaviour of a dynamical system without re-solving or even without knowing the underlying evolution equations. Such an interest is motivated on the one hand by the fact that many complex systems still miss a universally accepted state equation -e. g. brain dynamics  (Bassett and Sporns, 2017)  and macro-economical and financial systems  (Quinlan et al. , 2019)  -and, on the other, by the need to reduce the complexity of the dynamical evolution of the systems for which the underlying equations are known -e. g. on geophysical and turbulent flows  (Wang et al.
The output of the network at time step t + dt is W out r(t + dt) = y(t + dt), (2) where y(t +dt) is the ESN prediction, and W out with dimensions K × N is the weight matrix of the connections between the reservoir neurons and the output layer. We estimate W out via a ridge regression  (Hastie et al. , 2015) : W out = y train r T [rr T -λI ] -1 , (3) with λ = 10 -8 and y train ≡ {y(t) : (0 < t < T train )} as training datasets. Note that we have investigated different values of λ spanning 10 -8 < λ < 10 -2 on the Lorenz 1963 example and found little improvement only when the network size was large, with λ partially preventing overfitting. Values of λ < 10 -8 have not been investigated because they are too close to or below the numerical precision. In the prediction phase we have a recurrent relationship: r(t + dt) = tanh(W r(t) + W in W out r(t)).
The training dataset consists therefore of a gridded time series SLP(t) consisting of ∼ 14 600 time realizations of the pressure field over a grid of spatial size 72 longitudes × 73 latitudes. Our observable u(t) ≡ SLP(t) lon,lat , where brackets indicate the spatial average. In addition to the time moving-average filter, we also investigate the effect of spatial coarse graining of the SLP fields by a factor c and perform the learning on the reduced fields. We use the nearest neighbour approximation, which consists of taking from the original dataset the closest value to the coarse grid. Compared with methods based on averaging or dimension reduction techniques such as EOFs, the nearest neighbour approach has the advantage of not removing the extremes (except if the extreme is not in one of the closest grid points) and preserve cyclonic and anticyclonic structures.
Indeed, this is the case such that with the smallest network we get almost the minimal χ 2 distance T , the highest predictability (32 h) and one of the lowest initial errors. We also note that, for c = 0 (panels c and i), the fit always diverges for small network sizes. We compare in detail the results obtained for two 10-year predictions with w = 0 h and w = 12 h at N = 200 and c = 4 fixed. At the beginning of the forecast time (Supplement Video 1), the target field (panel a) is close to both that obtained with w = 0 h (panel b) and w = 12 h (panel c). When looking at a very late time (Supplement Video 2), of course we do not expect to see agreement among the three datasets. Indeed, we are well beyond the predictability horizon. However, we note that the dynamics for the run with w = 0 h is steady: positions of cyclones and anticyclones barely evolve with time.
Both the coupling between large and small scales and intermittency can be tuned in the model, giving rise to a plethora of behaviours. For the Lorenz 1996 model, we did not apply a moving-average filter to the data, as we can train the ESN on the large-scale variables only. Our computations have shown that, whenever the small scales are intermittent or the coupling is strong, learning the dynamics of the coarse-grained variable is more effective, both in terms of computation time and performances. The results also apply to geophysical datasets: here we analysed the atmospheric circulation, represented by sea-level pressure fields. Again we have shown that both a spatial coarse graining and a time moving-average filter improve the ESN performances. Our results may appear rather counterintuitive, as the weather and climate modelling communities are moving towards extending simulations of physical processes to small scales.
, 1987; Froyland et al. , 2014; Kwasniok, 1996). Finally, our results give a more formal framework for applications of machine learning techniques to geophysical data. Deep-learning approaches have proven useful in performing learning at different timescales and spatial scales whenever each layer is specialized in learning some specific features of the dynamics  (Bolton and Zanna, 2019; Gentine et al. , 2018). Indeed, several difficulties encountered in the application of machine learning to climate data could be overcome if the appropriate framework is used, but this requires a critical understanding of the limitations of the learning techniques. Code and data availability. The numerical code used in this article is provided in Appendix A (https://mantas. info/code/simple_esn/, last access: 28 August 2021,  Lukoševičius, 2021).
Supplement. The videos in the Supplement show the comparison between the sea-level pressure target field (a) from the NCEP database versus Echo State Network forecasts (b, c) obtained varying filters length w. Video 1 shows the forecasts immediately after the training, Video 2 the foreacsts 24 000 h after the training. The supplement related to this article is available online at: https://doi. org/10. 5194/npg-28-423-2021-supplement. Author contributions. DF, MV, PY, ST and VG conceived this study. DF, AH, CNL and GC performed the analysis. FMEP designed and performed the statistical tests. All the authors contributed to writing and discussing the results of the paper. Competing interests. The authors declare that they have no conflict of interest. Disclaimer. Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Acknowledgements. We thank  Barbara D'Alena ,  Julien Brajard ,  Venkatramani Balaji ,  Berengere Dubrulle ,  Robert Vautard ,  Nikki Vercauteren ,  Francois Daviaud , and  Yuzuru Sato  for useful discussions. We also thank  Matthew Levine  and three anonymous referees for useful suggestions on the manuscript. This work is supported by  CNRS INSU-LEFE-MANU  grant "DINCLIC". Financial support. This research has been supported by the  CNRS-INSU (LEFE-MANU , grant no. DINCLIC). Review statement. This paper was edited by  Amit Apte  and reviewed by  Matthew Levine  and three anonymous referees.
¦ ¥ Options for plotting the tree can be passed as a 'String' to the 'options' keyword argument. All the options of the 'R' function 'plot. phylo' from the 'ape' package are available. § ¤ plot_CladsOutput(output, options = "type = 'fan'") plot_CladsOutput(output, options = "lwd = 1, direction = 'leftwards'").
System setup Coarse-grain molecular dynamics simulations were conducted with the "open beta" version of the Martini 3. 0 CG force eld  35, 45  using the GROMACS 2016. 3 soware. 64 Lys 30 and Glu 30 CG polypeptides were generated using the martinize. py script included in the Martini 3. 0 beta release, using an extended sheet secondary structure backbone, generating harmonic ("elastic") bonds between (1,3) and (1,4) backbone beads, with an optimized force constant of 1250 kJ nm À2. This backbone structure was chosen based on experimental and theoretical ndings were a b-sheet structure was reported for P(L-lysine)/ P(L-glutamate) systems. 37 ] [68]  All amino acid side chains, and the C-and N-terminal beads have a full AE1e charge. It should be noted that the same resolution with the previous versions of the Martini force eld was used, albeit avoiding over-mapping for lysine.
Acknowledgements The authors would like to thank  Dr Ignacio Faustino Plo  for his contributions in the preliminary Martini 3 model of the RNA molecule. P. Frederix acknowledges support from the  Netherlands Organisation for Scientic Research (Veni ,  722. 015. 005 ). This research is supported by the " BaSyC-Building a Synthetic Cell " Gravitation grant ( 024. 003. 019 ) of the  Netherlands Ministry of Education, Culture, and Science (OCW)  and the  Netherlands Organization for Scientic Research (NWO/OCW ).
Applications based on Machine Learning models have now become an indispensable part of the everyday life and the professional world. A critical question then recently arises among the population: Do algorithmic decisions convey any type of discrimination against specific groups of population or minorities? In this paper, we show the importance of understanding how a bias can be introduced into automatic decisions. We first present a mathematical framework for the fair learning problem, specifically in the binary classification setting. We then propose to quantify the presence of bias by using the standard Disparate Impact index on the real and well-known Adult income data set. Finally, we check the performance of different approaches aiming to reduce the bias in binary classification outcomes.
For a more detailed background on these facts see for instance  Romei and Ruggieri (2014) ,  Berk et al. (2018)   Pedreschi et al. (2012)  or  Friedler et al. (2018) , and references therein. The technologies that AI offers certainly make life easier. It is however a common misconception that they are absolutely objective. In particular, machine learning algorithms which are meant to automatically take accurate and efficient decisions that mimic and even sometimes outmatch human expertise, rely heavily on potentially biased data. It is interesting to remark that this bias is often due to an inherent social bias existing in the population that is used to generate the training dataset of the machine learning models. A list of potential causes for the discriminatory behaviours that machine learning algorithms may exhibit, in the sense that groups of population are treated differently, is given in  Barocas and Selbst (2016).
(2016). Many other criteria (see for instance in  Berk et al. (2018)  for a review) have been proposed leading sometimes to incompatible formulations as stated in  Chouldechova (2017). Note finally that the notion of fairness is closely related to the notion of privacy as pointed out in  Dwork et al. (2012). In this paper, our goal is to present some comprehensive statistical results on fairness in machine learning studying the statistical parity criterion through the analysis of the example given in the Adult Income dataset. This public dataset is available on the UCI Machine Learning Repository 1. Here, the goal consists in forecasting a binary variable (low or high income) which corresponds to an income lower or higher than 50k$ a year. This decision could be potentially used to evaluate the credit risk of loan applicants, making this dataset particularly popular in the machine learning community.
It is considered here as potentially sensitive to a discrimination with respect to the Gender and Ethnic origin variables. The co-variables used in the prediction as well as the true outcome are available in the dataset, hence supervised machine learning algorithms will be used. Section 2 describes this dataset. It specifically highlights the existing unbalance between the income prediction and the Gender and Ethnic origin sensitive variables. We note that a preprocessing step is needed in order to prepare the data for further analyses and the performed modifications are detailed in the Appendix A. 1. 1. In Section 3, we then explain the statistical framework for the fairness problem, by particularly focusing on the binary classification setting. Among the wide array of definitions for fairness existing in the literature, we follow the approach of the Statistical Parity to quantify the fairness and we thus present the Disparate Impact as our preferred index for measuring the bias.
Note that the bias is present in this dataset, so the machine learning decision rules learned in this paper will be trained by using a biased dataset. Although, many criteria have been described in the fair learning literature, they are often used as a score without statistical control. In the cases where test procedures or confidence bounds are provided, they are obtained using a resampling scheme to get standardized Gaussian confidence intervals under a Gaussian assumption which does not correspond to the distribution of the observations. In this work, we promote the use of confidence intervals to control the risk of false discriminatory assessment. We then show in the Appendix A. 2 the exact asymptotic distribution of the estimates of different fairness criteria obtained through the classical approach of the Delta method described in  Van der Vaart (1998).
In both cases, we ask the reader to infer the intended use from context. Proofs and more technical details are included in the Appendix. Relevant code in Python to preprocess the Adult Income dataset and reproduce all the analysis and figures presented in this paper are available at the link https://github. com/XAI-ANITI/ StoryOfBias/blob/master/StoryOfBias. ipynb. We also provide the French version of this Python notebook at https://github. com/wikistat/Fair-ML-4-Ethical-AI/blob/ master/AdultCensus/AdultCensus-R-biasDetection. ipynb.
Machine learning algorithms for the attribution of bank loans One of the applications for which machine learning algorithms have already become firmly established is credit scoring. In order to minimize its risks, the banking industry uses machine learning models to detect the clients who are likely to deal with a credit loan. The FICO score in the US or the SCHUFA score in Germany are examples of these algorithmically determined credit rating scores, as well as those used by a number of Fintech startups, who are also basing their loan decisions entirely on algorithmic models  (Hurley and Adebayo, 2016)   2. Yet, credit rating systems have been criticized as opaque and biased in  Pasquale (2015) ,  Rothmann et al. (2014)  or  Hurley and Adebayo (2016). In this paper, we use the Adult Income dataset as a realistic material to reproduce this kind of analyses for credit risk assessment.
This dataset was built by using a database containing the results of a census made in the United States in 1994. It has been largely used among the fair learning community as a suitable benchmark to compare the performance of different machine learning methods. It contains information from about 48 thousands of individuals, each of them being described by 14 variables as detailed in Table  2. This dataset is often used to predict the binary variable Anual Income higher or not than 50k$. Such a forecast does not convey any discrimination itself, but it illustrates what can be done in the banking or insurance industry since the machine learning procedures are similar to those made by banks to evaluate the credit risk of their clients. The fact that the true value of the target variable is known, in contrast to the majority of the datasets available in the literature (e.
g. the German Credit Data), as well as the value of potential protected attributes such as the ethnic origin or the gender, makes this dataset one of the most widely used to compare the properties of the fair learning algorithms. In this paper, we will then compare supervised machine learning methods on this dataset. A graphic representation of the distribution of each feature can be found in https://www. valentinmihov. com/2015/04/17/adult-income-data-set/. This representation gives a good overview of what this dataset contains. It also makes clear that it has to be preprocessed before its analysis using black-box machine learning algorithms. In this work, we have deleted missing data, errors or inconsistencies. In some cases, this type of preprocessing practices could have fairness implications.
Unbalanced Learning Sample After pre-processing the dataset, standard preliminary exploratory analyses first show that the dataset obviously suffers from an unbalanced repartition of low and high incomes with respect to two variables: Gender (male or female) and Ethnic origin (caucasian or noncaucasian). These variables therefore seem to be potentially sensitive variables in our data. Figure  2  shows this unbalanced repartition of incomes with respect to these variables. It is of high importance to be aware of such unbalanced repartitions in reference datasets since a bank willing to use an automatic algorithm to predict which clients should have successful loan applications could be tempted to train the decision rules on such unbalanced data. This fact is at the heart of our work and we question its effect on further predictions on other data.
Notations Among the criteria proposed in the literature to reveal the presence of a bias in a dataset or in automatic decisions (see e. g. Hardt et al. (2016)  for a recent review), we focus in this paper on the so-called Statistical Parity. This criterion deals with the differences in reference decisions or the outcome of decision rules with respect to a sensitive attribute. Note that we only consider the binary classification problem with a single sensitive attribute for the sake of simplicity, although we could consider other tasks (e. g. regression) or multiple sensitive attributes (see  Hébert-Johnson et al. (2018)  or  Kearns et al. (2018) ). Here is a summary of the notations we use: • Y is the variable to be predicted. We consider here binary variables where Y = 1 is a positive decision (here a high income) while Y = 0 is a negative decision (here a low income); • g(X) = Ŷ is the prediction given by the algorithm.
Statistical n 10 (n 00 + n 10 ) / n 11 (n 01 + n 11 ) , (3. 2) where n ij is number of observations such that Y = i and S = j. The smaller this index, the stronger the discrimination over the minority group. Note first that this index supposes that P(Y = 1|S = 0) < P(Y = 1|S = 1) since S is defined as the group which can be discriminated with respect to the output Y. It is also important to remark that this estimation may be unstable due to the unbalanced amount of observations in the groups S = 0 and S = 1 and the inherent noise existing in all data. We then propose to estimate a confidence interval around the Disparate Impact in order to provide statistical guarantees of this score, as detailed in the Supplementary material A. 2. These confidence intervals will be used later in this section to quantify how reliable are two disparate impacts computed on our dataset.
Measures of disparate impacts The disparate impact DI(g, X, S) should be close to 1 to claim that g makes fair decisions. A more subtle, though critical, remark is that it should at least not be smaller than the general disparate impact DI(Y, S). This would indeed mean that the decision rules g reinforce the discriminations compared with the reference data on which it was trained. We will then measure hereafter the disparate impacts DI(Y, S) and DI(g, X, S) obtained on our dataset. In Table  1 , we have quantified confidence intervals for the bias already present in the original dataset using Eq. (3. 1) with the sensitive attributes Gender and Ethnic origin. They were computed using the method of Appendix A. 2 and represent the range of values the computed disparate impacts can have with a 95% confidence (subject to standard and reasonable hypotheses on the data).
(2016). The machine learning models we used in our experiments were then shown as unfair on this dataset, in the sense that discrimination is reinforced. As pointed out in  Friedler et al. (2018) , there may be a strong variability when computing the disparate impact of different subsamples of the data. Hence, we additionally propose in this paper an exact Central Limit Theorem to overcome this effect. The confidence intervals we obtain prove their stability when confronted to bootstrap replications and for this reason, therefore, we cross-validated our results using 10 replications of different learning and test samples on the three algorithms. The construction of these confidence intervals are postponed to Section A. 2 while comparison with bootstrap procedures are detailed in Section A.
3 of the Appendix. In order to conveniently compare the bias in the predictions with the one in the original data, we show on the left the bias measured in the data. We can see that these boxplots are coherent with the results of Table  1  and Figure  4 , and again show that the discrimination was reinforced by the machine learning models in In all generality, we conclude here that one has to be careful when training decision rules. They can indeed worsen existing discriminations in the original database. We also remark that the majority of works using the Disparate Impact as a measure of fairness rely only on this score as a numerical value with no estimation of how reliable it is. This motivated the definition of our confidence intervals strategy in Appendix A. 2, which was shown to be realistic in our experiments when comparing the Ref boxplots of Figure  4  with the confidence intervales of Tables 1.
We will see below that this is not that obvious, even in our simple example. It is first interesting to remark that the problem cannot be solved by simply having a balanced amount of observations with S = 0 and S = 1. We indeed reproduced the experimental protocol of Section 3. 2 with 16,192 randomly chosen observations representing males (instead of 32,650), so that the decision rules were trained in average with as many males as females. As shown in Fig. 5 , the trends of the results turned out to be very similar to those obtained in Fig. 4-(Gender). except that we used the same amount of males (S = 1) and females (S = 0) in the dataset. We specifically study in section the effect of complying to the European regulations. From a legal point of view, the GDPR's recommendation indeed consists in not using the sensitive variable in machine learning algorithms.
What if the sensitive variable is removed? The most obvious idea to remove the influence of a sensitive variable S is to remove it from the data, so we cannot use it when training the decision rules and then obviously when making new decisions. Note that this solution is recommended by GPDR regulations. To test the pertinence of this solution, we considered the algorithms analyzed in Sections 2 and 3 and then used them without using the Gender variable. As in Section 3, a 10-fold cross-validation approach was used to assess the robustness of our results. As shown Figure  6 -(top), the disparate impacts as well as the model accuracies remained almost unchanged when removing the Gender variable from the input data. Anonymizing database by removing a variable therefore had very little effect on the discrimination that is induced by the use of an automated decision algorithm.
Results obtained using the Separate Treatment strategy Note that the improvements are more spectacular for the basic Logistic Regression and Decision Tree models than for the Gradient Boosting model. This last model is indeed particularly efficient to capture fine high order relations between the variables, which gives less influence to the strong non-linearity generated when splitting the machine learning model into two class-specific models. Hence building different models reduces but does not solve the problem, the level of discrimination in the decisions being only slightly closer to the level of bias in the initial dataset.